use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationEditorWidgetTest method testSetExpirationTimePeriod.
@Test
public void testSetExpirationTimePeriod() {
String expiresAt = "some value";
NotificationRow row = new NotificationRow();
row.setExpiresAt(expiresAt);
presenter.setExpiration(Expiration.TIME_PERIOD, row);
verify(view, never()).setExpressionTextValue(any());
verify(view, never()).setExpirationDateTime(any());
verify(view).setExpirationTimePeriod(expiresAt);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testISO8601WrongWithTZ00ZRepeatableUntilStateChangesAndPeriodZeroValue.
@Test
public void testISO8601WrongWithTZ00ZRepeatableUntilStateChangesAndPeriodZeroValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R/2019-07-14T13:34:00Z/PT0Z");
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 testISO8601WithTZ02RepeatableValue.
@Test
public void testISO8601WithTZ02RepeatableValue() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("2019-07-14T13:34-02");
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 testWrongDayRepeatableNotification.
@Test
public void testWrongDayRepeatableNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt(" R44/PT33D");
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 testWrongHourRepeatableNotification.
@Test
public void testWrongHourRepeatableNotification() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R44/P33H");
boolean result = validator.isValid(notification, context);
assertFalse(result);
assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Aggregations