KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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

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