Search in sources :

Example 1 with PeriodicMeterReadsRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsRequest in project open-smart-grid-platform by OSGP.

the class PeriodicMeterReadsRequestFactory method fromParameterMap.

public static PeriodicMeterReadsRequest fromParameterMap(final Map<String, String> requestParameters) {
    final PeriodicMeterReadsRequest periodicMeterReadsRequest = new PeriodicMeterReadsRequest();
    periodicMeterReadsRequest.setDeviceIdentification(requestParameters.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
    periodicMeterReadsRequest.setPeriodicReadsRequestData(PeriodicReadsRequestDataFactory.fromParameterMap(requestParameters));
    return periodicMeterReadsRequest;
}
Also used : PeriodicMeterReadsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsRequest)

Example 2 with PeriodicMeterReadsRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsRequest in project open-smart-grid-platform by OSGP.

the class PeriodicMeterReadsSteps method theGetMeterReadsRequestIsReceived.

@When("^the get \"([^\"]*)\" meter reads request is received$")
public void theGetMeterReadsRequestIsReceived(final String periodType, final Map<String, String> settings) throws Throwable {
    final PeriodicMeterReadsRequest request = PeriodicMeterReadsRequestFactory.fromParameterMap(settings);
    final PeriodicMeterReadsAsyncResponse asyncResponse = this.requestClient.doRequest(request);
    assertThat(asyncResponse).isNotNull();
    ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Also used : PeriodicMeterReadsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsRequest) PeriodicMeterReadsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsAsyncResponse) When(io.cucumber.java.en.When)

Aggregations

PeriodicMeterReadsRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsRequest)2 When (io.cucumber.java.en.When)1 PeriodicMeterReadsAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PeriodicMeterReadsAsyncResponse)1