1 package uk.co.jezuk.mango; 2 3 import junit.framework.*; 4 5 public class UnaryOrTest extends TestCase 6 { 7 public UnaryOrTest(String 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 } 16 public void test2() 17 { 18 Predicate t = Predicates.Or(Predicates.False(), Predicates.True()); 19 assertEquals(true, t.test(null)); 20 } 22 public void test3() 23 { 24 Predicate t = Predicates.Or(Predicates.True(), Predicates.False()); 25 assertEquals(true, t.test(null)); 26 } 28 public void test4() 29 { 30 Predicate t = Predicates.Or(Predicates.False(), Predicates.False()); 31 assertEquals(false, t.test(null)); 32 } } | Popular Tags |