use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testRepeatingIntervals.
@Test
public void testRepeatingIntervals() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("R5/P1Y2M5DT4H5M8S6MS");
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 testRepeatingIntervalsW.
@Test
public void testRepeatingIntervalsW() {
NotificationRow value = new NotificationRow();
value.setExpiresAt("R2/P1WT20H13M");
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 testISO8601WithTZ02Repeatable1AndPeriodAndWrongYearValue.
@Test
public void testISO8601WithTZ02Repeatable1AndPeriodAndWrongYearValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R1/1919-07-14T13:34-02/PT33M");
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 testWrongDayRepeatableUntilNotification.
@Test
public void testWrongDayRepeatableUntilNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R/P33D");
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 testEmptyNotificationRow.
@Test
public void testEmptyNotificationRow() {
boolean result = validator.isValid(new NotificationRow(), context);
assertFalse(result);
assertFalse(errorMessages.isEmpty());
assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Aggregations