Search in sources :

Example 1 with PeriodicMeterReadsGasRequest

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

the class PeriodicMeterReadsGasRequestFactory method fromParameterMap.

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

Example 2 with PeriodicMeterReadsGasRequest

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

the class PeriodicMeterReadsGasSteps method theGetMeterReadsGasRequestIsReceived.

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

Aggregations

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