use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasAsyncRequest in project open-smart-grid-platform by OSGP.
the class PeriodicMeterReadsGasSteps method theMeterReadsGasResultShouldBeReturned.
@Then("^the \"([^\"]*)\" meter reads gas result should be returned$")
public void theMeterReadsGasResultShouldBeReturned(final String periodType, final Map<String, String> settings) throws Throwable {
final PeriodicMeterReadsGasAsyncRequest asyncRequest = PeriodicMeterReadsGasRequestFactory.fromScenarioContext();
LOGGER.warn("Asyncrequest: {} ", asyncRequest);
final PeriodicMeterReadsGasResponse 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.getPeriodicMeterReadsGas()).as("Expected periodic meter reads gas").isNotNull();
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasAsyncRequest in project open-smart-grid-platform by OSGP.
the class PeriodicMeterReadsGasRequestFactory method fromScenarioContext.
public static PeriodicMeterReadsGasAsyncRequest fromScenarioContext() {
final PeriodicMeterReadsGasAsyncRequest periodicMeterReadsGasAsyncRequest = new PeriodicMeterReadsGasAsyncRequest();
periodicMeterReadsGasAsyncRequest.setCorrelationUid(RequestFactoryHelper.getCorrelationUidFromScenarioContext());
periodicMeterReadsGasAsyncRequest.setDeviceIdentification(RequestFactoryHelper.getDeviceIdentificationFromScenarioContext());
return periodicMeterReadsGasAsyncRequest;
}
Aggregations