use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testR1PT0H.
@Test
public void testR1PT0H() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R1/PT0H");
boolean result = validator.isValid(notification, context);
assertFalse(result);
assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testPT4H.
@Test
public void testPT4H() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("PT4H");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testRepeatingIntervalsD.
@Test
public void testRepeatingIntervalsD() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("R2/P1DT20H13M");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testHourRepeatableUntilStateChangesNotification.
@Test
public void testHourRepeatableUntilStateChangesNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R/PT33H");
boolean result = validator.isValid(notification, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testWrongTimesZeroRepeatable1UntilNotification.
@Test
public void testWrongTimesZeroRepeatable1UntilNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R1/PT0H");
boolean result = validator.isValid(notification, context);
assertFalse(result);
assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Aggregations