Class DateAttributePredicateTest
java.lang.Object
net.shibboleth.profile.context.logic.DateAttributePredicateTest
Unit test for
DateAttributePredicate.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ProfileRequestContextcreateProfileRequestContext(String name, String[] values, Instant[] dtvalues) private String[]javaDateStrings(Duration... offsets) Produces an array of date strings that are offsets from current system time.private net.shibboleth.profile.context.logic.DateAttributePredicatenewJavaPredicate(String attribute, Duration offset) Object[][]voidvoidtestJavaTime(net.shibboleth.profile.context.logic.DateAttributePredicate predicate, String attribute, String[] values, boolean expected)
-
Field Details
-
javaformatter
-
-
Constructor Details
-
DateAttributePredicateTest
public DateAttributePredicateTest()
-
-
Method Details
-
provideTestDataJava
-
testJavaTime
public void testJavaTime(net.shibboleth.profile.context.logic.DateAttributePredicate predicate, String attribute, String[] values, boolean expected) throws Exception - Throws:
Exception
-
testDateTimeValues
public void testDateTimeValues() -
createProfileRequestContext
private ProfileRequestContext createProfileRequestContext(String name, String[] values, Instant[] dtvalues) -
javaDateStrings
Produces an array of date strings that are offsets from current system time.- Parameters:
offsets- One or more durations that are added to the current system time.- Returns:
- Array of date strings, one for each provided offset.
-
newJavaPredicate
-