Search in sources :

Example 61 with NotificationRow

use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.

the class NotificationValueValidatorTest method testISO8601WithTZ02ZRepeatable1AndPeriodTooBigValue.

@Test
public void testISO8601WithTZ02ZRepeatable1AndPeriodTooBigValue() {
    NotificationRow notification = new NotificationRow();
    notification.setExpiresAt("R1/2019-07-14T13:34-02/PT3333333333333333333M");
    boolean result = new NotificationValueValidator().isValid(notification, context);
    assertFalse(result);
    assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Also used : NotificationRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow) Test(org.junit.Test)

Example 62 with NotificationRow

use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.

the class NotificationValueValidatorTest method testISO8601WrongWithTZ00ZRepeatableZeroUntilStateChangesAndPeriodZeroValue.

@Test
public void testISO8601WrongWithTZ00ZRepeatableZeroUntilStateChangesAndPeriodZeroValue() {
    NotificationRow notification = new NotificationRow();
    notification.setExpiresAt("R0/2019-07-14T13:34:00Z/PT1M");
    boolean result = validator.isValid(notification, context);
    assertFalse(result);
    assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Also used : NotificationRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow) Test(org.junit.Test)

Example 63 with NotificationRow

use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.

the class NotificationValueValidatorTest method testP2M2D.

@Test
public void testP2M2D() {
    NotificationRow value = new NotificationRow();
    value.setExpiresAt("P2M2D");
    boolean result = validator.isValid(value, context);
    assertTrue(result);
    assertTrue(errorMessages.isEmpty());
}
Also used : NotificationRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow) Test(org.junit.Test)

Example 64 with NotificationRow

use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.

the class NotificationValueValidatorTest method testNotificationAndTZ002.

@Test
public void testNotificationAndTZ002() {
    NotificationRow notification = new NotificationRow();
    notification.setExpiresAt("2019-07-14T13:34:00Z");
    boolean result = validator.isValid(notification, context);
    assertTrue(result);
    assertTrue(errorMessages.isEmpty());
}
Also used : NotificationRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow) Test(org.junit.Test)

Example 65 with NotificationRow

use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.

the class NotificationValueValidatorTest method testR120011201T133402RP1DT3H.

@Test
public void testR120011201T133402RP1DT3H() {
    NotificationRow value = new NotificationRow();
    value.setExpiresAt("R1/2001-12-01T13:34-02/P1DT1H");
    boolean result = validator.isValid(value, context);
    assertTrue(result);
    assertTrue(errorMessages.isEmpty());
}
Also used : NotificationRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow) Test(org.junit.Test)

Aggregations

NotificationRow (org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow)140 Test (org.junit.Test)127 Column (com.google.gwt.user.cellview.client.Column)11 ReflectionUtilsTest (org.kie.workbench.common.stunner.bpmn.client.forms.util.ReflectionUtilsTest)9 PopoverTextCell (org.uberfire.ext.widgets.common.client.tables.PopoverTextCell)9 ArrayList (java.util.ArrayList)5 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)4 LienzoMockitoTestRunner (com.ait.lienzo.test.LienzoMockitoTestRunner)3 TextCell (com.google.gwt.cell.client.TextCell)3 HasData (com.google.gwt.view.client.HasData)3 ListDataProvider (com.google.gwt.view.client.ListDataProvider)3 GwtMock (com.google.gwtmockito.GwtMock)3 GwtMockito (com.google.gwtmockito.GwtMockito)3 Collections (java.util.Collections)3 List (java.util.List)3 Assert (org.junit.Assert)3 Before (org.junit.Before)3 RunWith (org.junit.runner.RunWith)3 NotificationsEditorWidget (org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.NotificationsEditorWidget)3 NotificationEvent (org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.event.NotificationEvent)3