Class DateAttributePredicateTest

java.lang.Object
net.shibboleth.profile.context.logic.DateAttributePredicateTest

public class DateAttributePredicateTest extends Object
Unit test for DateAttributePredicate.
  • Field Details

  • Constructor Details

    • DateAttributePredicateTest

      public DateAttributePredicateTest()
  • Method Details

    • provideTestDataJava

      @DataProvider(name="test-data-java") public Object[][] 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

      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.
    • newJavaPredicate

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