use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.
the class ParsedReassignmentsInfosTest method testNotificationEmpty.
@Test
public void testNotificationEmpty() {
ReassignmentValue value = ParsedReassignmentsInfos.of(AssociationType.NOT_COMPLETED_REASSIGN.getName(), "");
ReassignmentValue valid = new ReassignmentValue();
valid.setType(AssociationType.NOT_COMPLETED_REASSIGN.getName());
assertEquals(valid, value);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.
the class ReassignmentRowTest method testToReassignmentValue.
@Test
public void testToReassignmentValue() {
// Setup
final ReassignmentValue expectedResult = new ReassignmentValue();
expectedResult.setDuration("0" + Duration.HOUR.getAlias());
expectedResult.setType("NotCompletedReassign");
// Run the test
final ReassignmentValue result = new ReassignmentRow().toReassignmentValue();
// Verify the results
assertEquals(expectedResult, result);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.
the class ReassignmentValueValidatorTest method testNegativeDurationReassignmentValue.
@Test
public void testNegativeDurationReassignmentValue() {
ReassignmentValue value = new ReassignmentValue();
value.setDuration("-1d");
boolean result = validator.isValid(value, context);
assertFalse(result);
assertFalse(errorMessages.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.
the class ReassignmentValueValidatorTest method test3DigExpiresAtReassignmentValue.
@Test
public void test3DigExpiresAtReassignmentValue() {
ReassignmentValue value = new ReassignmentValue();
value.setDuration("111d");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.
the class ReassignmentValueValidatorTest method test1DigExpiresAtReassignmentValue.
@Test
public void test1DigExpiresAtReassignmentValue() {
ReassignmentValue value = new ReassignmentValue();
value.setDuration("1d");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
Aggregations