use of org.simbasecurity.core.service.manager.dto.TimeConditionDTO in project simba-os by cegeka.
the class ConditionDTOAssemblerTest method testAssembleSingleConditionData.
@Test
public void testAssembleSingleConditionData() {
TimeCondition condition = createTimeCondition();
TimeConditionDTO conditionData = (TimeConditionDTO) ConditionDTOAssembler.assemble(condition);
assertNotNull(conditionData);
assertEquals(0, conditionData.getId());
assertEquals(condition.getName(), conditionData.getName());
assertEquals(condition.getStartCondition(), conditionData.getStartCondition());
assertEquals(condition.getEndCondition(), conditionData.getEndCondition());
assertEquals(0, conditionData.getId());
assertEquals(0, conditionData.getVersion());
}
use of org.simbasecurity.core.service.manager.dto.TimeConditionDTO in project simba-os by cegeka.
the class ConditionDTOAssemblerTest method testAssembleSingleCondition.
@Test
public void testAssembleSingleCondition() {
TimeConditionDTO condition = createTimeConditionData();
TimeCondition conditionData = (TimeCondition) ConditionDTOAssembler.assemble(condition);
assertNotNull(conditionData);
assertEquals(0, conditionData.getId());
assertEquals(condition.getName(), conditionData.getName());
assertEquals(condition.getStartCondition(), conditionData.getStartCondition());
assertEquals(condition.getEndCondition(), conditionData.getEndCondition());
assertEquals(0, conditionData.getId());
assertEquals(0, conditionData.getVersion());
}
use of org.simbasecurity.core.service.manager.dto.TimeConditionDTO in project simba-os by cegeka.
the class ConditionDTOAssembler method assemble.
private static TimeConditionDTO assemble(final TimeCondition condition) {
final TimeConditionDTO conditionDTO = new TimeConditionDTO();
applyVersionAndId((AbstractVersionedEntity) condition, conditionDTO);
conditionDTO.setName(condition.getName());
conditionDTO.setStartCondition(condition.getStartCondition());
conditionDTO.setEndCondition(condition.getEndCondition());
return conditionDTO;
}
use of org.simbasecurity.core.service.manager.dto.TimeConditionDTO in project simba-os by cegeka.
the class ConditionDTOAssemblerTest method createTimeConditionData.
private TimeConditionDTO createTimeConditionData() {
TimeConditionDTO condition = new TimeConditionDTO();
condition.setName("time condition");
condition.setStartCondition("0 0 12 * * ?");
condition.setEndCondition("0 0 12 * * ?");
return condition;
}
Aggregations