Search in sources :

Example 6 with AddDeviceAsyncRequest

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

the class FunctionalExceptionsSteps method theAddDeviceResponseForAnExistingDeviceIsReceived.

@Then("^the add device response for an existing device is received$")
public void theAddDeviceResponseForAnExistingDeviceIsReceived(final Map<String, String> responseParameters) throws Throwable {
    final String correlationUid = (String) ScenarioContext.current().get(PlatformKeys.KEY_CORRELATION_UID);
    final Map<String, String> extendedParameters = SettingsHelper.addDefault(responseParameters, PlatformKeys.KEY_CORRELATION_UID, correlationUid);
    final AddDeviceAsyncRequest addDeviceAsyncRequest = AddDeviceRequestFactory.fromParameterMapAsync(extendedParameters);
    try {
        this.smartMeteringInstallationClient.getAddDeviceResponse(addDeviceAsyncRequest);
    } catch (final Exception exception) {
        ScenarioContext.current().put(PlatformKeys.RESPONSE, exception);
    }
}
Also used : AddDeviceAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.AddDeviceAsyncRequest) ReadSettingsHelper.getString(org.opensmartgridplatform.cucumber.core.ReadSettingsHelper.getString) Then(io.cucumber.java.en.Then)

Aggregations

AddDeviceAsyncRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.AddDeviceAsyncRequest)6 Then (io.cucumber.java.en.Then)3 When (io.cucumber.java.en.When)1 AddDeviceAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.AddDeviceAsyncResponse)1 AddDeviceRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.AddDeviceRequest)1 AddDeviceResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.AddDeviceResponse)1 ReadSettingsHelper.getString (org.opensmartgridplatform.cucumber.core.ReadSettingsHelper.getString)1 SoapFaultClientException (org.springframework.ws.soap.client.SoapFaultClientException)1