1 /*
2 * Copyright (c) 2002-2003 The XDoclet Team.
3 * All rights reserved.
4 */
5
6 package xdoclet.util.predicates;
7
8 import junit.framework.TestCase;
9
10 /***
11 * @version $Revision: 1.2 $
12 * @author <a href="mailto:mbo@jcs.be">Mathias Bogaert</a>
13 */
14 public class SimplePredicateFactoryTest extends TestCase {
15 public void testSimplePredicateFactory() {
16 SimplePredicateFactory factory = new SimplePredicateFactory();
17 try {
18 try {
19 factory.createPredicate(null);
20 }
21 catch (PredicateException e) {
22 fail("caught PredicateException for factory.createPredicate(null) instead of IllegalArgument");
23 e.printStackTrace();
24 }
25 fail("factory.createPredicate(null) does not throw IllegalArgumentException");
26 }
27 catch (IllegalArgumentException e) {
28 // good
29 }
30
31 try {
32 factory.createPredicate("");
33 fail("factory.createPredicate(\"\") does not throw PredicateException");
34 }
35 catch (PredicateException e) {
36 // good
37 }
38 }
39 }
This page was automatically generated by Maven