use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsAsyncRequest in project open-smart-grid-platform by OSGP.
the class PeriodicMeterReadsSteps method theMeterReadsResultShouldBeReturned.
@Then("^the \"([^\"]*)\" meter reads result should be returned$")
public void theMeterReadsResultShouldBeReturned(final String periodType, final Map<String, String> settings) throws Throwable {
final PeriodicMeterReadsAsyncRequest asyncRequest = PeriodicMeterReadsRequestFactory.fromScenarioContext();
final PeriodicMeterReadsResponse response = this.responseClient.getResponse(asyncRequest);
assertThat(response).as("PeriodicMeterReadsGasResponse should not be null").isNotNull();
assertThat(response.getPeriodType()).as("PeriodType should match").isEqualTo(PeriodType.fromValue(periodType));
assertThat(response.getPeriodicMeterReads()).as("Expected periodic meter reads gas").isNotNull();
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsAsyncRequest in project open-smart-grid-platform by OSGP.
the class PeriodicMeterReadsRequestFactory method fromScenarioContext.
public static PeriodicMeterReadsAsyncRequest fromScenarioContext() {
final PeriodicMeterReadsAsyncRequest periodicMeterReadsAsyncRequest = new PeriodicMeterReadsAsyncRequest();
periodicMeterReadsAsyncRequest.setCorrelationUid(RequestFactoryHelper.getCorrelationUidFromScenarioContext());
periodicMeterReadsAsyncRequest.setDeviceIdentification(RequestFactoryHelper.getDeviceIdentificationFromScenarioContext());
return periodicMeterReadsAsyncRequest;
}
Aggregations