Search in sources :

Example 1 with DecoupleMbusDeviceRequest

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

the class DecoupleDeviceSteps method theDecoupleGMeterRequestIsReceived.

@When("^the Decouple G-meter \"([^\"]*)\" from E-meter \"([^\"]*)\" request is received$")
public void theDecoupleGMeterRequestIsReceived(final String gasMeter, final String eMeter) throws WebServiceSecurityException {
    final DecoupleMbusDeviceRequest request = DecoupleMbusDeviceRequestFactory.forGatewayAndMbusDevice(eMeter, gasMeter);
    final DecoupleMbusDeviceAsyncResponse asyncResponse = this.smartMeteringInstallationClient.decoupleMbusDevice(request);
    this.checkAndSaveCorrelationId(asyncResponse.getCorrelationUid());
}
Also used : DecoupleMbusDeviceRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceRequest) DecoupleMbusDeviceAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with DecoupleMbusDeviceRequest

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

the class DecoupleDeviceSteps method theDecoupleGMeterFromEMeterRequestIsReceivedForAnUnknownDevice.

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

Example 3 with DecoupleMbusDeviceRequest

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

the class DecoupleMbusDeviceRequestFactory method forGatewayAndMbusDevice.

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

Example 4 with DecoupleMbusDeviceRequest

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

the class DecoupleDeviceSteps method theDecoupleGMeterFromEMeterRequestIsReceivedForAnInactiveDevice.

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

Aggregations

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