Search in sources :

Example 1 with PeriodicMeterReadsGasAsyncRequest

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();
}
Also used : PeriodicMeterReadsGasResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasResponse) PeriodicMeterReadsGasAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasAsyncRequest) Then(io.cucumber.java.en.Then)

Example 2 with PeriodicMeterReadsGasAsyncRequest

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;
}
Also used : PeriodicMeterReadsGasAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasAsyncRequest)

Aggregations

PeriodicMeterReadsGasAsyncRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasAsyncRequest)2 Then (io.cucumber.java.en.Then)1 PeriodicMeterReadsGasResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsGasResponse)1