use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusResponseMappingTest method shouldConvertGetMbusEncryptionKeyStatusResponse.
@Test
public void shouldConvertGetMbusEncryptionKeyStatusResponse() {
final GetMbusEncryptionKeyStatusResponseData source = this.makeResponse();
final GetMbusEncryptionKeyStatusResponse result = this.mapper.map(source, GetMbusEncryptionKeyStatusResponse.class);
assertThat(result).as(MAPPED_OBJECT_NULL_MESSAGE).isNotNull();
assertThat(result.getMbusDeviceIdentification()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getMbusDeviceIdentification());
assertThat(result.getEncryptionKeyStatus().name()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getEncryptionKeyStatus().name());
}
use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData 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());
}
Aggregations