Search in sources :

Example 1 with CoupleMbusDeviceRequest

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

the class CoupleDeviceSteps method theCoupleGMeterToEMeterRequestOnChannelIsReceivedForAnUnknownGateway.

@When("^the Couple G-meter \"([^\"]*)\" to E-meter \"([^\"]*)\" request is received for an unknown gateway$")
public void theCoupleGMeterToEMeterRequestOnChannelIsReceivedForAnUnknownGateway(final String gasMeter, final String eMeter) throws WebServiceSecurityException {
    final CoupleMbusDeviceRequest request = CoupleMbusDeviceRequestFactory.forGatewayMbusDevice(eMeter, gasMeter);
    try {
        this.smartMeteringInstallationClient.coupleMbusDevice(request);
        Assertions.fail("A SoapFaultClientException should be thrown");
    } catch (final SoapFaultClientException e) {
        ScenarioContext.current().put(PlatformKeys.RESPONSE, e);
    }
}
Also used : CoupleMbusDeviceRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceRequest) SoapFaultClientException(org.springframework.ws.soap.client.SoapFaultClientException) When(io.cucumber.java.en.When)

Example 2 with CoupleMbusDeviceRequest

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

the class CoupleDeviceSteps method theCoupleGMeterRequestOnChannelIsReceivedForAnInactiveDevice.

@When("^the Couple G-meter \"([^\"]*)\" to E-meter \"([^\"]*)\" request is received for an inactive device$")
public void theCoupleGMeterRequestOnChannelIsReceivedForAnInactiveDevice(final String gasMeter, final String eMeter) throws WebServiceSecurityException {
    final CoupleMbusDeviceRequest request = CoupleMbusDeviceRequestFactory.forGatewayMbusDevice(eMeter, gasMeter);
    try {
        this.smartMeteringInstallationClient.coupleMbusDevice(request);
        Assertions.fail("A SoapFaultClientException should be thrown");
    } catch (final SoapFaultClientException e) {
        ScenarioContext.current().put(PlatformKeys.RESPONSE, e);
    }
}
Also used : CoupleMbusDeviceRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceRequest) SoapFaultClientException(org.springframework.ws.soap.client.SoapFaultClientException) When(io.cucumber.java.en.When)

Example 3 with CoupleMbusDeviceRequest

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

the class CoupleMbusDeviceRequestFactory method forGatewayMbusDevice.

public static CoupleMbusDeviceRequest forGatewayMbusDevice(final String gatewayDeviceIdentification, final String mbusDeviceIdentification) {
    final CoupleMbusDeviceRequest coupleMbusDeviceRequest = new CoupleMbusDeviceRequest();
    coupleMbusDeviceRequest.setDeviceIdentification(gatewayDeviceIdentification);
    coupleMbusDeviceRequest.setMbusDeviceIdentification(mbusDeviceIdentification);
    return coupleMbusDeviceRequest;
}
Also used : CoupleMbusDeviceRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceRequest)

Example 4 with CoupleMbusDeviceRequest

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

the class CoupleDeviceSteps method theCoupleGMeterRequestIsReceivedForEMeter.

@When("^the Couple G-meter \"([^\"]*)\" request is received for E-meter \"([^\"]*)\"$")
public void theCoupleGMeterRequestIsReceivedForEMeter(final String gasMeter, final String eMeter) throws WebServiceSecurityException {
    final CoupleMbusDeviceRequest request = CoupleMbusDeviceRequestFactory.forGatewayMbusDevice(eMeter, gasMeter);
    final CoupleMbusDeviceAsyncResponse asyncResponse = this.smartMeteringInstallationClient.coupleMbusDevice(request);
    this.checkAndSaveCorrelationId(asyncResponse.getCorrelationUid());
}
Also used : CoupleMbusDeviceRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceRequest) CoupleMbusDeviceAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceAsyncResponse) When(io.cucumber.java.en.When)

Aggregations

CoupleMbusDeviceRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceRequest)4 When (io.cucumber.java.en.When)3 SoapFaultClientException (org.springframework.ws.soap.client.SoapFaultClientException)2 CoupleMbusDeviceAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceAsyncResponse)1