use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testISO8601WithTZ00ZRepeatableUntilStateChangesAndPeriodValue.
@Test
public void testISO8601WithTZ00ZRepeatableUntilStateChangesAndPeriodValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R/2019-07-14T13:34:00Z/P33M");
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 testPT4HOrPT6HWrong.
@Test
public void testPT4HOrPT6HWrong() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("PT4H,ZPT6H");
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 testNegativeExpiresAtNotificationRow.
@Test
public void testNegativeExpiresAtNotificationRow() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("-1d");
boolean result = validator.isValid(value, 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 testISO8601DataTimeRepeatableValue.
@Test
public void testISO8601DataTimeRepeatableValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R/2019-07-14T13:34-02/PT33M");
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 test2s.
@Test
public void test2s() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("2s");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
Aggregations