Class TestSupportedEffectivityConditions


public class TestSupportedEffectivityConditions extends RepositoryConformanceTestCase
Test that a repository can select instances by their effectivity dates.
The code above the repository asks "which instances are in effect at this moment" constantly, and today it answers that question in Java, after retrieval, by testing each instance's effectiveFromTime and effectiveToTime. Both repositories hold those two values as searchable header properties, so the question can be asked of the repository instead - but only if the null cases behave, because an open-ended effectivity is the normal case, not the exception.
The condition asserted here is the one such a push-down would use:
     ALL of:
         ANY of: effectiveFromTime IS NULL, effectiveFromTime <= T
         ANY of: effectiveToTime   IS NULL, effectiveToTime   >  T
 
Getting the null handling wrong here does not throw - it silently changes which elements a caller sees, which is why this needs certifying before anything relies on it.
  • Constructor Details

    • TestSupportedEffectivityConditions

      public TestSupportedEffectivityConditions(RepositoryConformanceWorkPad workPad, EntityDef entityDef)
      Set up the test case.
      Parameters:
      workPad - place for parameters and results
      entityDef - the entity type being tested
  • Method Details