KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > uk > co > jezuk > mango > UnaryAndTest


1 package uk.co.jezuk.mango;
2
3 import junit.framework.*;
4
5 public class UnaryAndTest extends TestCase
6 {
7   public UnaryAndTest(String JavaDoc name) { super(name); }
8   public static Test suite() { return new TestSuite(UnaryAndTest.class); }
9
10   public void test1()
11   {
12     Predicate t = Predicates.And(Predicates.True(), Predicates.True());
13     assertEquals(true, t.test(null));
14   } // test1
15

16   public void test2()
17   {
18     Predicate t = Predicates.And(Predicates.False(), Predicates.True());
19     assertEquals(false, t.test(null));
20   } // test2
21

22   public void test3()
23   {
24     Predicate t = Predicates.And(Predicates.True(), Predicates.False());
25     assertEquals(false, t.test(null));
26   } // test3
27

28   public void test4()
29   {
30     Predicate t = Predicates.And(Predicates.False(), Predicates.False());
31     assertEquals(false, t.test(null));
32   } // test4
33
} // UnaryAndTest
34
Popular Tags