use of org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusResponseDataMapperTest method shouldConvertDtoToValueObject.
@Test
public void shouldConvertDtoToValueObject() {
final GetMbusEncryptionKeyStatusResponseDto source = this.makeResponse();
final GetMbusEncryptionKeyStatusResponseData result = this.mapper.map(source, GetMbusEncryptionKeyStatusResponseData.class);
assertThat(result).withFailMessage(MAPPED_OBJECT_VALUE_MESSAGE).isNotNull();
assertThat(result.getMbusDeviceIdentification()).withFailMessage(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getMbusDeviceIdentification());
assertThat(result.getEncryptionKeyStatus().name()).withFailMessage(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getEncryptionKeyStatus().name());
}
use of org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusResponseMessageProcessor method handleMessage.
@Override
protected void handleMessage(final MessageMetadata deviceMessageMetadata, final ResponseMessage responseMessage, final OsgpException osgpException) {
final GetMbusEncryptionKeyStatusResponseDto getMbusEncryptionKeyStatusResponseDto = (GetMbusEncryptionKeyStatusResponseDto) responseMessage.getDataObject();
this.configurationService.handleGetMbusEncryptionKeyStatusResponse(deviceMessageMetadata, responseMessage.getResult(), osgpException, getMbusEncryptionKeyStatusResponseDto);
}
Aggregations