use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationValue in project kie-wb-common by kiegroup.
the class ParsedNotificationsInfosTest method testNotificationPartialVerticalBar.
@Test
public void testNotificationPartialVerticalBar() {
String body = "[from:|tousers:|togroups:|replyTo:|subject:ZZZ|ZZZ|ZZZ||body:asd|||asd]@[0h]";
NotificationValue actual = ParsedNotificationsInfos.of(AssociationType.NOT_COMPLETED_NOTIFY.getName(), body);
NotificationValue expected = new NotificationValue();
expected.setType(AssociationType.NOT_COMPLETED_NOTIFY.getName());
expected.setExpiresAt("0h");
expected.setBody("asd|||asd");
expected.setSubject("ZZZ|ZZZ|ZZZ|");
assertEquals(expected.toString(), actual.toString());
assertEquals(expected.toCDATAFormat(), actual.toCDATAFormat());
assertEquals(expected, actual);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationValue in project kie-wb-common by kiegroup.
the class NotificationRowTest method testToNotificationValue.
@Test
public void testToNotificationValue() {
// Setup
final NotificationValue expectedResult = new NotificationValue();
expectedResult.setExpiresAt("");
expectedResult.setFrom("");
expectedResult.setBody("");
expectedResult.setSubject("");
expectedResult.setReplyTo("");
expectedResult.setType("NotCompletedNotify");
// Run the test
final NotificationValue result = new NotificationRow().toNotificationValue();
// Verify the results
assertEquals(expectedResult, result);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationValue in project kie-wb-common by kiegroup.
the class NotificationPropertyWriterTest method getNotificationValue.
private NotificationValue getNotificationValue(String type) {
List<String> users = new ArrayList<>();
users.add("AAA");
users.add("BBB");
List<String> groups = new ArrayList<>();
users.add("G1");
users.add("G2");
NotificationValue value = new NotificationValue();
value.setType(type);
value.setUsers(users);
value.setGroups(groups);
value.setFrom("User");
value.setReplyTo("Admin");
value.setSubject("Subj");
value.setBody("Body");
return value;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationValue in project kie-wb-common by kiegroup.
the class NotificationTypeListValueTest method getNotificationValues.
private List<NotificationValue> getNotificationValues() {
List<NotificationValue> result = new ArrayList<>();
result.add(new NotificationValue("AAA", "1h", "Subj", "me", "NotStartedNotify", "me", Arrays.asList("foo", "bar", "baz"), Arrays.asList("foo", "bar", "baz"), ""));
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationValue in project kie-wb-common by kiegroup.
the class NotificationsInfoTest method getNotificationValues.
private List<NotificationValue> getNotificationValues() {
List<NotificationValue> result = new ArrayList<>();
result.add(new NotificationValue("AAA", "1h", "Subj", "me", "NotStartedNotify", "me", Arrays.asList("foo", "bar", "baz"), Arrays.asList("foo", "bar", "baz"), ""));
return result;
}
Aggregations