use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType in project midpoint by Evolveum.
the class TestActivationComputer method testGetInValidity.
@Test
public void testGetInValidity() throws Exception {
System.out.println("\n===[ testGetInValidity ]===\n");
// GIVEN
Clock clock = createClock(SUMMER_SOLSTICE);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(null, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(null, activationType);
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.ENABLED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType in project midpoint by Evolveum.
the class TestActivationComputer method testGetArchivedAdministrativeEnabled.
@Test
public void testGetArchivedAdministrativeEnabled() throws Exception {
System.out.println("\n===[ testGetArchivedAdministrativeEnabled ]===\n");
// GIVEN
Clock clock = createClock(SUMMER_SOLSTICE);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(ActivationStatusType.ENABLED, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(SchemaConstants.LIFECYCLE_ARCHIVED, activationType);
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.ARCHIVED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType in project midpoint by Evolveum.
the class TestActivationComputer method testGetAfterValidity.
@Test
public void testGetAfterValidity() throws Exception {
System.out.println("\n===[ testGetAfterValidity ]===\n");
// GIVEN
Clock clock = createClock(WINTER_SOLSTICE);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(null, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(null, activationType);
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.DISABLED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType in project midpoint by Evolveum.
the class TestActivationComputer method testGetDeprecatedAdministrativeEnabled.
@Test
public void testGetDeprecatedAdministrativeEnabled() throws Exception {
System.out.println("\n===[ testGetDeprecatedAdministrativeEnabled ]===\n");
// GIVEN
Clock clock = createClock(SUMMER_SOLSTICE);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(ActivationStatusType.ENABLED, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(SchemaConstants.LIFECYCLE_DEPRECATED, activationType);
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.ENABLED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType in project midpoint by Evolveum.
the class TestActivationComputer method testGetDeprecatedAdministrativeDisabled.
@Test
public void testGetDeprecatedAdministrativeDisabled() throws Exception {
System.out.println("\n===[ testGetDeprecatedAdministrativeDisabled ]===\n");
// GIVEN
Clock clock = createClock(SUMMER_SOLSTICE);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(ActivationStatusType.DISABLED, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(SchemaConstants.LIFECYCLE_DEPRECATED, activationType);
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.DISABLED, effectiveStatus);
}
Aggregations