Search in sources :

Example 1 with GetMbusEncryptionKeyStatusRequestData

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData in project open-smart-grid-platform by OSGP.

the class GetMbusEncryptionKeyStatusRequestDataMapperTest method makeRequest.

private GetMbusEncryptionKeyStatusRequestData makeRequest() {
    final GetMbusEncryptionKeyStatusRequestData request = new GetMbusEncryptionKeyStatusRequestData(MBUS_DEVICE_IDENTIFICATION);
    request.setChannel(CHANNEL);
    return request;
}
Also used : GetMbusEncryptionKeyStatusRequestData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData)

Example 2 with GetMbusEncryptionKeyStatusRequestData

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData in project open-smart-grid-platform by OSGP.

the class GetMbusEncryptionKeyStatusRequestDataMapperTest method shouldConvertValueObjectToDto.

@Test
public void shouldConvertValueObjectToDto() {
    final GetMbusEncryptionKeyStatusRequestData source = this.makeRequest();
    final GetMbusEncryptionKeyStatusRequestDto result = this.mapper.map(source, GetMbusEncryptionKeyStatusRequestDto.class);
    assertThat(result).withFailMessage(MAPPED_OBJECT_VALUE_MESSAGE).isNotNull();
    assertThat(result.getMbusDeviceIdentification()).withFailMessage(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getMbusDeviceIdentification());
    assertThat(result.getChannel()).withFailMessage(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getChannel());
}
Also used : GetMbusEncryptionKeyStatusRequestDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestDto) GetMbusEncryptionKeyStatusRequestData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData) Test(org.junit.jupiter.api.Test)

Example 3 with GetMbusEncryptionKeyStatusRequestData

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData in project open-smart-grid-platform by OSGP.

the class GetMbusEncryptionKeyStatusRequestMappingTest method shouldConvertGetMbusEncryptionKeyStatusDataRequest.

@Test
public void shouldConvertGetMbusEncryptionKeyStatusDataRequest() {
    final GetMbusEncryptionKeyStatusRequest source = this.makeRequest();
    final GetMbusEncryptionKeyStatusRequestData result = this.mapper.map(source, GetMbusEncryptionKeyStatusRequestData.class);
    assertThat(result).as(MAPPED_OBJECT_NULL_MESSAGE).isNotNull();
    assertThat(result.getMbusDeviceIdentification()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getMbusDeviceIdentification());
}
Also used : GetMbusEncryptionKeyStatusRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusRequest) GetMbusEncryptionKeyStatusRequestData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData) Test(org.junit.jupiter.api.Test)

Aggregations

GetMbusEncryptionKeyStatusRequestData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestData)3 Test (org.junit.jupiter.api.Test)2 GetMbusEncryptionKeyStatusRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusRequest)1 GetMbusEncryptionKeyStatusRequestDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusRequestDto)1