Search in sources :

Example 1 with PeriodicMeterReadsRequestDataDto

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

the class GetPeriodicMeterReadsCommandExecutor method fromBundleRequestInput.

@Override
public PeriodicMeterReadsRequestDto fromBundleRequestInput(final ActionRequestDto bundleInput) throws ProtocolAdapterException {
    this.checkActionRequestType(bundleInput);
    final PeriodicMeterReadsRequestDataDto periodicMeterReadsRequestDataDto = (PeriodicMeterReadsRequestDataDto) bundleInput;
    return new PeriodicMeterReadsRequestDto(periodicMeterReadsRequestDataDto.getPeriodType(), periodicMeterReadsRequestDataDto.getBeginDate(), periodicMeterReadsRequestDataDto.getEndDate());
}
Also used : PeriodicMeterReadsRequestDataDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDataDto) PeriodicMeterReadsRequestDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDto)

Example 2 with PeriodicMeterReadsRequestDataDto

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

the class GetPeriodicMeterReadsCommandExecutorTest method testBundle.

@Test
void testBundle() throws ProtocolAdapterException {
    final PeriodicMeterReadsRequestDataDto request = new PeriodicMeterReadsRequestDataDto(PeriodTypeDto.DAILY, new Date(this.from), new Date(this.to));
    final PeriodicMeterReadsRequestDto dto = this.executor.fromBundleRequestInput(request);
    assertThat(dto).isNotNull();
}
Also used : PeriodicMeterReadsRequestDataDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDataDto) PeriodicMeterReadsRequestDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDto) Date(java.util.Date) Test(org.junit.jupiter.api.Test)

Aggregations

PeriodicMeterReadsRequestDataDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDataDto)2 PeriodicMeterReadsRequestDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.PeriodicMeterReadsRequestDto)2 Date (java.util.Date)1 Test (org.junit.jupiter.api.Test)1