Search in sources :

Example 16 with ReassignmentValue

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);
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 17 with ReassignmentValue

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);
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 18 with ReassignmentValue

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());
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 19 with ReassignmentValue

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());
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 20 with ReassignmentValue

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());
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Aggregations

ReassignmentValue (org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue)22 Test (org.junit.Test)17 ArrayList (java.util.ArrayList)4 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 GwtEvent (com.google.gwt.event.shared.GwtEvent)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 IsWidget (com.google.gwt.user.client.ui.IsWidget)1 Widget (com.google.gwt.user.client.ui.Widget)1 HTMLInputElement (elemental2.dom.HTMLInputElement)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Dependent (javax.enterprise.context.Dependent)1 Inject (javax.inject.Inject)1 StunnerBPMNConstants (org.kie.workbench.common.stunner.bpmn.client.forms.fields.i18n.StunnerBPMNConstants)1 ReassignmentRow (org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.ReassignmentRow)1 ReassignmentsEditorWidget (org.kie.workbench.common.stunner.bpmn.client.forms.fields.reassignmentsEditor.ReassignmentsEditorWidget)1 ReflectionUtilsTest (org.kie.workbench.common.stunner.bpmn.client.forms.util.ReflectionUtilsTest)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1 ReassignmentTypeListValue (org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentTypeListValue)1