use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testISO8601WithTZ00ZRepeatableValue.
@Test
public void testISO8601WithTZ00ZRepeatableValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("2019-07-14T13:34:00Z");
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 test6d.
@Test
public void test6d() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("6d");
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 testRandomChars.
@Test
public void testRandomChars() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("P~!@#$%^&*()_+=-{}][:\"';<>?/.,");
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 testWrongPeriodNotification.
@Test
public void testWrongPeriodNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("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 testRepeatingIntervalsY.
@Test
public void testRepeatingIntervalsY() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("R2/P1YT20H13M");
boolean result = validator.isValid(value, context);
assertTrue(result);
assertTrue(errorMessages.isEmpty());
}
Aggregations