1 /*
2 * Copyright (c) 2002-2003 The XDoclet Team.
3 * All rights reserved.
4 */
5
6 package xdoclet;
7
8 import junit.framework.TestCase;
9 import org.apache.commons.collections.Predicate;
10 import xdoclet.util.predicates.Or;
11
12 /***
13 * Test for Accept.
14 *
15 * @version $Revision: 1.4 $
16 * @author <a href="mailto:mbo@jcs.be">Mathias Bogaert</a>
17 */
18 public class AcceptTest extends TestCase {
19 public void testAccept() throws XDocletException {
20 Accept accept = new Accept();
21 Predicate or = (Predicate) accept.createElement("or");
22 if (!(or instanceof Or))
23 fail("Returned predicate of accept.createElement(or) is not instanceof Or");
24
25 try {
26 accept.createElement("and");
27 fail("Accept allows more than one predicate");
28 }
29 catch (XDocletException e) {
30 // good
31 }
32 }
33 }
This page was automatically generated by Maven