use of org.opensmartgridplatform.dto.valueobjects.smartmetering.SpecialDaysRequestDto in project open-smart-grid-platform by OSGP.
the class SpecialDaysRequestMappingTest method testSpecialDaysRequestMappingNull.
// To check mapping of SpecialDaysRequest, when its SpecialDaysRequestData
// is null
@Test
public void testSpecialDaysRequestMappingNull() {
final String deviceIdentification = "nr1";
final SpecialDaysRequestData specialDaysRequestData = null;
final SpecialDaysRequest specialDaysRequestValueObject = new SpecialDaysRequest(deviceIdentification, specialDaysRequestData);
final SpecialDaysRequestDto specialDaysRequestDto = this.configurationMapper.map(specialDaysRequestValueObject, SpecialDaysRequestDto.class);
assertThat(specialDaysRequestDto).isNotNull();
assertThat(specialDaysRequestDto.getDeviceIdentification()).isEqualTo(deviceIdentification);
assertThat(specialDaysRequestDto.getSpecialDaysRequestData()).isNull();
}
Aggregations