Search in sources :

Example 1 with GetMbusEncryptionKeyStatusResponseData

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());
}
Also used : GetMbusEncryptionKeyStatusResponseData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData) GetMbusEncryptionKeyStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse) Test(org.junit.jupiter.api.Test)

Example 2 with GetMbusEncryptionKeyStatusResponseData

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

Aggregations

Test (org.junit.jupiter.api.Test)2 GetMbusEncryptionKeyStatusResponseData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData)2 GetMbusEncryptionKeyStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse)1 GetMbusEncryptionKeyStatusResponseDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseDto)1