Search in sources :

Example 1 with SmartMeteringDeviceDtoBuilder

use of org.opensmartgridplatform.dto.valueobjects.smartmetering.SmartMeteringDeviceDtoBuilder in project open-smart-grid-platform by OSGP.

the class DeviceConverterTest method convertsSmartMeteringDtoToDlmsDevice.

@Test
public void convertsSmartMeteringDtoToDlmsDevice() {
    final SmartMeteringDeviceDto dto = new SmartMeteringDeviceDtoBuilder().build();
    final DlmsDevice result = this.converter.convertTo(dto, null, null);
    final DlmsDevice expected = this.converted(dto);
    Assertions.assertThat(result).isEqualToIgnoringGivenFields(expected, "creationTime", "modificationTime", "version");
}
Also used : SmartMeteringDeviceDtoBuilder(org.opensmartgridplatform.dto.valueobjects.smartmetering.SmartMeteringDeviceDtoBuilder) SmartMeteringDeviceDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.SmartMeteringDeviceDto) DlmsDevice(org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.DlmsDevice) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 DlmsDevice (org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.DlmsDevice)1 SmartMeteringDeviceDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.SmartMeteringDeviceDto)1 SmartMeteringDeviceDtoBuilder (org.opensmartgridplatform.dto.valueobjects.smartmetering.SmartMeteringDeviceDtoBuilder)1