Search in sources :

Example 1 with ScanMbusChannelsAsyncRequest

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

the class ScanMbusChannelsRequestFactory method fromScenarioContext.

public static ScanMbusChannelsAsyncRequest fromScenarioContext() {
    final ScanMbusChannelsAsyncRequest asyncRequest = new ScanMbusChannelsAsyncRequest();
    asyncRequest.setCorrelationUid(RequestFactoryHelper.getCorrelationUidFromScenarioContext());
    asyncRequest.setDeviceIdentification(RequestFactoryHelper.getDeviceIdentificationFromScenarioContext());
    return asyncRequest;
}
Also used : ScanMbusChannelsAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsAsyncRequest)

Example 2 with ScanMbusChannelsAsyncRequest

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

the class ScanMbusChannelsSteps method theFoundMBusDevicesAreInTheResponse.

@Then("^the found M-bus devices are in the response$")
public void theFoundMBusDevicesAreInTheResponse(final Map<String, String> settings) throws Throwable {
    final ScanMbusChannelsAsyncRequest asyncRequest = ScanMbusChannelsRequestFactory.fromScenarioContext();
    final ScanMbusChannelsResponse response = this.responseClient.getResponse(asyncRequest);
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(settings.get(PlatformSmartmeteringKeys.RESULT));
    this.assertChannelShortIds(settings, response.getChannelShortIds());
}
Also used : ScanMbusChannelsAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsAsyncRequest) ScanMbusChannelsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsResponse) Then(io.cucumber.java.en.Then)

Aggregations

ScanMbusChannelsAsyncRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsAsyncRequest)2 Then (io.cucumber.java.en.Then)1 ScanMbusChannelsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.ScanMbusChannelsResponse)1