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());
}
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();
}
Aggregations