use of org.apereo.portal.groups.pags.testers.StringEqualsIgnoreCaseTester in project uPortal by Jasig.
the class PAGSTest method testStringEqualsIgnoreCaseTester.
public void testStringEqualsIgnoreCaseTester() throws Exception {
print(CR + "***** ENTERING PAGSTester.testStringEqualsIgnoreCaseTester() *****" + CR);
String msg = null;
msg = "Creating a new IPerson";
print(msg);
IPerson newPerson = getIPerson("de3");
assertNotNull(msg, newPerson);
print("Adding attributes to IPerson.");
newPerson.setAttribute(key1, randomStrings[0]);
newPerson.setAttribute(key2, randomStrings[1].toLowerCase());
msg = "Testing IPerson " + newPerson;
print(msg);
String testKey = randomStrings[0].toLowerCase();
IPersonTester tester1 = new StringEqualsIgnoreCaseTester(new TestPersonAttributesGroupTestDefinition(key1, testKey));
IPersonTester tester2 = new StringEqualsIgnoreCaseTester(new TestPersonAttributesGroupTestDefinition(key2, randomStrings[1]));
msg = "Testing " + tester1;
assertTrue(msg, tester1.test(newPerson));
msg = "Testing " + tester2;
assertTrue(msg, tester2.test(newPerson));
print("Success!");
print(CR + "***** LEAVING PAGSTester.testStringEqualsIgnoreCaseTester() *****" + CR);
}
Aggregations