Search in sources :

Example 6 with SpecialDaysRequestDto

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

Aggregations

SpecialDaysRequestDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.SpecialDaysRequestDto)6 Test (org.junit.jupiter.api.Test)4 SpecialDaysRequest (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SpecialDaysRequest)4 SpecialDaysRequestData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SpecialDaysRequestData)4 CosemDate (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemDate)2 SpecialDay (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SpecialDay)2 CosemDateDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.CosemDateDto)2 SpecialDayDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.SpecialDayDto)2 SpecialDaysRequestDataDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.SpecialDaysRequestDataDto)2 SmartMeter (org.opensmartgridplatform.domain.core.entities.SmartMeter)1