01: package uk.co.jezuk.mango;
02:
03: import junit.framework.*;
04:
05: public class LessThanEqualsTest extends TestCase {
06: java.util.List list;
07:
08: public LessThanEqualsTest(String name) {
09: super (name);
10: }
11:
12: public static Test suite() {
13: return new TestSuite(LessThanEqualsTest.class);
14: }
15:
16: private BinaryPredicate p_;
17:
18: protected void setUp() {
19: p_ = Predicates.LessThanEquals();
20: } // setUp
21:
22: public void test1() {
23: assertEquals(true, p_.test(new Integer(1), new Integer(3)));
24: } // test1
25:
26: public void test2() {
27: assertEquals(true, p_.test("hello", "zibignew"));
28: } // test2
29:
30: public void test3() {
31: assertEquals(false, p_.test(new Integer(3), new Integer(1)));
32: } // test3
33:
34: public void test4() {
35: assertEquals(false, p_.test("hello", "aerosol"));
36: } // test4
37:
38: public void test5() {
39: assertEquals(true, p_.test(new Integer(3), new Integer(3)));
40: } // test5
41:
42: public void test6() {
43: assertEquals(true, p_.test("hello", "hello"));
44: } // test6
45:
46: public void test7() {
47: assertEquals(true, p_.test(null, null));
48: } // test7
49:
50: public void test8() {
51: assertEquals(true, p_.test(null, "word"));
52: } // test8
53:
54: public void test9() {
55: assertEquals(false, p_.test("word", null));
56: } // test9
57: } // LessThanEqualsTest
|