Class DateAttributePredicateTest


  • public class DateAttributePredicateTest
    extends Object
    Unit test for DateAttributePredicate.
    • Constructor Detail

      • DateAttributePredicateTest

        public DateAttributePredicateTest()
    • Method Detail

      • testJodaTime

        public void testJodaTime​(net.shibboleth.idp.profile.logic.DateAttributePredicate predicate,
                                 String attribute,
                                 String[] values,
                                 boolean expected)
                          throws Exception
        Throws:
        Exception
      • testJavaTime

        public void testJavaTime​(net.shibboleth.idp.profile.logic.DateAttributePredicate predicate,
                                 String attribute,
                                 String[] values,
                                 boolean expected)
                          throws Exception
        Throws:
        Exception
      • createProfileRequestContext

        private org.opensaml.profile.context.ProfileRequestContext createProfileRequestContext​(String name,
                                                                                               String[] values)
      • jodaDateStrings

        private String[] jodaDateStrings​(Duration... offsets)
        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.
      • javaDateStrings

        private String[] javaDateStrings​(Duration... offsets)
        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.
      • newJodaPredicate

        private net.shibboleth.idp.profile.logic.DateAttributePredicate newJodaPredicate​(String attribute,
                                                                                         Duration offset)
      • newJavaPredicate

        private net.shibboleth.idp.profile.logic.DateAttributePredicate newJavaPredicate​(String attribute,
                                                                                         Duration offset)