use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.
the class AbstractActivationComputerTest method testGetActiveAdministrativeDisabled.
@Test
public void testGetActiveAdministrativeDisabled() throws Exception {
// GIVEN
Clock clock = createClock(YEAR_START);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(ActivationStatusType.DISABLED, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(SchemaConstants.LIFECYCLE_ACTIVE, activationType, createLifecycleModel());
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.DISABLED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.
the class AbstractActivationComputerTest method testGetBeforeValidity.
@Test
public void testGetBeforeValidity() throws Exception {
// GIVEN
Clock clock = createClock(YEAR_START);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(null, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(null, activationType, createLifecycleModel());
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.DISABLED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.
the class AbstractActivationComputerTest method testGetArchivedAdministrativeEnabled.
@Test
public void testGetArchivedAdministrativeEnabled() throws Exception {
// 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, createLifecycleModel());
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.ARCHIVED, effectiveStatus);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.
the class AbstractActivationComputerTest method testCompute.
protected void testCompute(String lifecycleState, XMLGregorianCalendar now, ActivationStatusType administrativeStatus, XMLGregorianCalendar validFrom, XMLGregorianCalendar validTo, ActivationStatusType expectedEffective, TimeIntervalStatusType expectedValidity) throws SchemaException, IOException {
// GIVEN
Clock clock = createClock(now);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(administrativeStatus, validFrom, validTo);
// WHEN
activationComputer.computeEffective(lifecycleState, activationType, createLifecycleModel());
// THEN
assertEquals("Unexpected effective status", expectedEffective, activationType.getEffectiveStatus());
assertEquals("Unexpected validity status", expectedValidity, activationType.getValidityStatus());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.
the class TestActivationComputerDefault method testGetDraftAdministrativeEnabled.
@Test
public void testGetDraftAdministrativeEnabled() {
// GIVEN
Clock clock = createClock(YEAR_START);
ActivationComputer activationComputer = createActivationComputer(clock);
ActivationType activationType = createActivationType(ActivationStatusType.DISABLED, SPRING_EQUINOX, AUTUMN_EQUINOX);
// WHEN
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(SchemaConstants.LIFECYCLE_DRAFT, activationType, createLifecycleModel());
// THEN
assertEquals("Unexpected effective status", ActivationStatusType.DISABLED, effectiveStatus);
}
Aggregations