Search in sources :

Example 1 with GetMbusEncryptionKeyStatusResponseDto

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());
}
Also used : GetMbusEncryptionKeyStatusResponseData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData) GetMbusEncryptionKeyStatusResponseDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto) Test(org.junit.jupiter.api.Test)

Example 2 with GetMbusEncryptionKeyStatusResponseDto

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);
}
Also used : GetMbusEncryptionKeyStatusResponseDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto)

Aggregations

GetMbusEncryptionKeyStatusResponseDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto)2 Test (org.junit.jupiter.api.Test)1 GetMbusEncryptionKeyStatusResponseData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData)1