Search in sources :

Example 1 with PeriodicMeterReadsAsyncRequest

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

Example 2 with PeriodicMeterReadsAsyncRequest

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

Aggregations

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