Search in sources :

Example 1 with SetMbusUserKeyByChannelRequest

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

the class SetEncryptionKeyExchangeOnGMeterSteps method theSetMbusUserKeyByChannelRequestIsReceived.

@When("^the set m-bus user key by channel request is received$")
public void theSetMbusUserKeyByChannelRequestIsReceived(final Map<String, String> requestData) throws Throwable {
    final SetMbusUserKeyByChannelRequest setMbusUserKeyByChannelRequest = SetMbusUserKeyByChannelRequestFactory.fromParameterMap(requestData);
    final SetMbusUserKeyByChannelAsyncResponse setMbusUserKeyByChannelAsyncResponse = this.smartMeteringConfigurationClient.setMbusUserKeyByChannel(setMbusUserKeyByChannelRequest);
    assertThat(setMbusUserKeyByChannelAsyncResponse).as("Set M-Bus User Key By Channel async response should not be null").isNotNull();
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setMbusUserKeyByChannelAsyncResponse.getCorrelationUid());
}
Also used : SetMbusUserKeyByChannelRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelRequest) SetMbusUserKeyByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with SetMbusUserKeyByChannelRequest

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

the class SetMbusUserKeyByChannelRequestFactory method fromParameterMap.

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

Aggregations

SetMbusUserKeyByChannelRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelRequest)2 When (io.cucumber.java.en.When)1 SetMbusUserKeyByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelAsyncResponse)1 SetMbusUserKeyByChannelRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetMbusUserKeyByChannelRequestData)1