use of org.eclipse.vorto.repository.notification.message.CheckinMessage in project vorto by eclipse.
the class NotificationServiceTest method testSendCheckedModelEmail.
@Test
public void testSendCheckedModelEmail() throws Exception {
User user = new User();
user.setEmail("alexander.edelmann@bosch-si.com");
user.setUsername("aedelmann");
ModelInfo resource = new ModelInfo(new ModelId("Fridge", "org.eclipse.vorto.examples", "1.0.0"), ModelType.Functionblock);
resource.setAuthor("andreas");
resource.setCreationDate(new Date());
resource.setDescription("A fridge keeps groceries fresh");
notificationService.sendNotification(new CheckinMessage(user, resource));
assertEquals(1, wiser.getMessages().size());
assertTrue(((String) wiser.getMessages().get(0).getMimeMessage().getContent()).contains("A new model has just been checked into the Vorto Repository"));
assertTrue(((String) wiser.getMessages().get(0).getMimeMessage().getContent()).contains("Dear aedelmann"));
}
Aggregations