use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.notification.SendNotificationRequest in project open-smart-grid-platform by OSGP.
the class NotificationServiceWsTest method testMappingFromGenericSendNotificationRequest.
@Test
public void testMappingFromGenericSendNotificationRequest() {
final GenericSendNotificationRequest genericRequest = new GenericSendNotificationRequest(this.createGenericNotification());
final SendNotificationRequest sendNotificationRequest = this.mapperFactory.getMapperFacade().map(genericRequest, SendNotificationRequest.class);
final Notification notification = sendNotificationRequest.getNotification();
assertThat(notification.getMessage()).isEqualTo(MESSAGE);
assertThat(notification.getResult()).isEqualTo(RESULT);
assertThat(notification.getDeviceIdentification()).isEqualTo(DEVICEIDENTIFICATION);
assertThat(notification.getCorrelationUid()).isEqualTo(CORRELATION_UID);
assertThat(notification.getNotificationType()).isEqualTo(NOTIFICATION_TYPE);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.notification.SendNotificationRequest in project open-smart-grid-platform by OSGP.
the class NotificationServiceWsTest method testMappingToGenericSendNotificationRequest.
@Test
public void testMappingToGenericSendNotificationRequest() {
final SendNotificationRequest sendNotificationRequest = new SendNotificationRequest();
sendNotificationRequest.setNotification(this.createNotification());
final GenericSendNotificationRequest genericRequest = this.mapperFactory.getMapperFacade().map(sendNotificationRequest, GenericSendNotificationRequest.class);
final GenericNotification genericNotification = genericRequest.getNotification();
assertThat(genericNotification.getMessage()).isEqualTo(MESSAGE);
assertThat(genericNotification.getResult()).isEqualTo(RESULT);
assertThat(genericNotification.getDeviceIdentification()).isEqualTo(DEVICEIDENTIFICATION);
assertThat(genericNotification.getCorrelationUid()).isEqualTo(CORRELATION_UID);
assertThat(genericNotification.getNotificationType()).isEqualTo(NOTIFICATION_TYPE.name());
}
Aggregations