@Override public List<NotificationSchemaDto> getNotificationSchemasByAppId(String applicationId) throws ControlServiceException { return notificationService.findNotificationSchemasByAppId(applicationId); }
@Test public void testRemoveNotificationSchemasByAppId() { NotificationDto dto = generateNotificationsDto(null, null, 3, null).get(0); String appId = dto.getApplicationId(); notificationService.removeNotificationSchemasByAppId(appId); List<NotificationSchemaDto> schemas = notificationService.findNotificationSchemasByAppId(appId); Assert.assertTrue(schemas.isEmpty()); }
@Test public void testFindNotificationSchemasByAppId() { NotificationSchemaDto schema = generateNotificationSchemaDto(null, null); Assert.assertNotNull(schema); NotificationSchemaDto found = notificationService.findNotificationSchemasByAppId(schema.getApplicationId()).get(1); Assert.assertEquals(schema, found); }