Search in sources :

Example 6 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 testIntOverflowExpiresAtReassignmentValue.

@Test
public void testIntOverflowExpiresAtReassignmentValue() {
    ReassignmentValue value = new ReassignmentValue();
    value.setDuration("2147483648d");
    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 7 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 test2DigExpiresAtReassignmentValue.

@Test
public void test2DigExpiresAtReassignmentValue() {
    ReassignmentValue value = new ReassignmentValue();
    value.setDuration("11d");
    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 8 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 test4DigExpiresAtReassignmentValue.

@Test
public void test4DigExpiresAtReassignmentValue() {
    ReassignmentValue value = new ReassignmentValue();
    value.setDuration("1111d");
    boolean result = validator.isValid(value, context);
    assertTrue(result);
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 9 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 testIntMaxExpiresAtReassignmentValue.

@Test
public void testIntMaxExpiresAtReassignmentValue() {
    ReassignmentValue value = new ReassignmentValue();
    value.setDuration("2147483647d");
    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 10 with ReassignmentValue

use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.

the class ReassignmentPropertyWriterTest method getReassignmentValue.

private ReassignmentValue getReassignmentValue(String type) {
    List<String> users = new ArrayList<>();
    users.add("AAA");
    users.add("BBB");
    List<String> groups = new ArrayList<>();
    users.add("G1");
    users.add("G2");
    ReassignmentValue value = new ReassignmentValue();
    value.setType(type);
    value.setUsers(users);
    value.setGroups(groups);
    value.setDuration("1d");
    return value;
}
Also used : ArrayList(java.util.ArrayList) ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue)

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