Package org.jasig.portal.groups.pags.testers

Examples of org.jasig.portal.groups.pags.testers.IntegerLTTester


    msg = "Testing IPerson " + newPerson;
    print(msg);

    // test value == attribute value.  Should answer false.
    IPersonTester tester1 = new IntegerLTTester(key1, randomIntStrings[0]);
    // test value < attribute value.  Should answer false.
    IPersonTester tester2 = new IntegerLTTester(key2, "0");
    // test value > any attribute value.  Should answer true.
    IPersonTester tester3 = new IntegerLTTester(key3, "" + INTEGER_MAX);
    // test value < any attribute value.  Should answer false.
    IPersonTester tester4 = new IntegerLTTester(key3, "" + INTEGER_MIN);
    // test value > attribute value.  Should answer true.
    IPersonTester tester5 = new IntegerLTTester(key1, "" + INTEGER_MAX);
 
    msg = "Testing " + tester1;
    assertFalse(msg, tester1.test(newPerson));
    msg = "Testing " + tester2;
    assertFalse(msg, tester2.test(newPerson));
    msg = "Testing " + tester3;
    assertTrue(msg, tester3.test(newPerson));
    msg = "Testing " + tester4;
    assertFalse(msg, tester4.test(newPerson));
    msg = "Testing " + tester5;
    assertTrue(msg, tester5.test(newPerson));

    print("Success!");
    print(CR + "***** LEAVING PAGSTester.testIntegerLTTester() *****" + CR);

}
View Full Code Here


    msg = "Testing IPerson " + newPerson;
    print(msg);

    // test value == attribute value.  Should answer false.
    IPersonTester tester1 = new IntegerLTTester(key1, randomIntStrings[0]);
    // test value < attribute value.  Should answer false.
    IPersonTester tester2 = new IntegerLTTester(key2, "0");
    // test value > any attribute value.  Should answer true.
    IPersonTester tester3 = new IntegerLTTester(key3, "" + INTEGER_MAX);
    // test value < any attribute value.  Should answer false.
    IPersonTester tester4 = new IntegerLTTester(key3, "" + INTEGER_MIN);
    // test value > attribute value.  Should answer true.
    IPersonTester tester5 = new IntegerLTTester(key1, "" + INTEGER_MAX);
 
    msg = "Testing " + tester1;
    assertFalse(msg, tester1.test(newPerson));
    msg = "Testing " + tester2;
    assertFalse(msg, tester2.test(newPerson));
    msg = "Testing " + tester3;
    assertTrue(msg, tester3.test(newPerson));
    msg = "Testing " + tester4;
    assertFalse(msg, tester4.test(newPerson));
    msg = "Testing " + tester5;
    assertTrue(msg, tester5.test(newPerson));

    print("Success!");
    print(CR + "***** LEAVING PAGSTester.testIntegerLTTester() *****" + CR);

}
View Full Code Here

        assertFalse(tester.test(person));
    }
   
    @Test
    public void testIntegerLT() {
        IPersonTester tester = new IntegerLTTester(intAttributeName, "124");
        assertTrue(tester.test(person));
       
        tester = new IntegerLTTester(intAttributeName, "122");
        assertFalse(tester.test(person));
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.groups.pags.testers.IntegerLTTester

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.