Ejemplo n.º 1
0
        //-------------------------------------------------------------------------
        public virtual void test_or()
        {
            ObjLongPredicate <string> fn1 = (a, b) => b > 3;
            ObjLongPredicate <string> fn2 = (a, b) => a.length() > 3;
            ObjLongPredicate <string> or  = fn1.or(fn2);

            assertEquals(fn1.test("a", 2L), false);
            assertEquals(fn1.test("a", 4L), true);
            assertEquals(fn2.test("a", 4L), false);
            assertEquals(fn2.test("abcd", 4L), true);
            assertEquals(or.test("a", 2L), false);
            assertEquals(or.test("a", 4L), true);
            assertEquals(or.test("abcd", 2L), true);
            assertEquals(or.test("abcd", 4L), true);
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = NullPointerException.class) public void test_or_null()
        public virtual void test_or_null()
        {
            ObjLongPredicate <string> fn1 = (a, b) => b > 3;

            fn1.or(null);
        }