use of org.motechproject.admin.web.dto.NotificationRuleDto in project motech by motech.
the class MessageControllerTest method shouldHandleNotificationDto.
@Test
public void shouldHandleNotificationDto() {
NotificationRule notificationRule1 = mock(NotificationRule.class);
NotificationRule notificationRule2 = mock(NotificationRule.class);
List<NotificationRule> ruleList = asList(notificationRule1, notificationRule2);
NotificationRuleDto notificationRuleDto = new NotificationRuleDto();
notificationRuleDto.setNotificationRules(ruleList);
notificationRuleDto.setIdsToRemove(asList("id1", "id2"));
controller.saveNotificationRules(notificationRuleDto);
verify(statusMessageService).saveNotificationRules(ruleList);
verify(statusMessageService).removeNotificationRule("id1");
verify(statusMessageService).removeNotificationRule("id2");
}
Aggregations