Search in sources :

Example 1 with GetMbusEncryptionKeyStatusRequest

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

the class GetMbusEncryptionKeyStatusSteps method aGetMbusEncryptionKeyStatusRequestIsReceived.

@When("^a get M-Bus encryption key status request is received$")
public void aGetMbusEncryptionKeyStatusRequestIsReceived(final Map<String, String> requestData) throws WebServiceSecurityException, GeneralSecurityException, IOException {
    final GetMbusEncryptionKeyStatusRequest request = GetMbusEncryptionKeyStatusRequestFactory.fromParameterMap(requestData);
    final GetMbusEncryptionKeyStatusAsyncResponse asyncResponse = this.smartMeterConfigurationClient.getMbusEncryptionKeyStatus(request);
    assertThat(asyncResponse).as(OPERATION + ": Async response should not be null").isNotNull();
    LOGGER.info(OPERATION + ": Async response is received {}", asyncResponse);
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION, asyncResponse.getDeviceIdentification());
}
Also used : GetMbusEncryptionKeyStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse) GetMbusEncryptionKeyStatusRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusRequest) When(io.cucumber.java.en.When)

Example 2 with GetMbusEncryptionKeyStatusRequest

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

the class GetMbusEncryptionKeyStatusRequestFactory method fromParameterMap.

public static GetMbusEncryptionKeyStatusRequest fromParameterMap(final Map<String, String> requestParameters) {
    final GetMbusEncryptionKeyStatusRequest request = new GetMbusEncryptionKeyStatusRequest();
    request.setDeviceIdentification(requestParameters.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
    return request;
}
Also used : GetMbusEncryptionKeyStatusRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusRequest)

Aggregations

GetMbusEncryptionKeyStatusRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusRequest)2 When (io.cucumber.java.en.When)1 GetMbusEncryptionKeyStatusAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse)1