Search in sources :

Example 1 with GetKeysRequest

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

the class GetKeys method aGetKeysRequestIsReceived.

@When("^a get keys request is received$")
public void aGetKeysRequestIsReceived(final Map<String, String> settings) throws Throwable {
    final GetKeysRequest request = GetKeysRequestFactory.fromParameterMap(settings);
    final GetKeysAsyncResponse asyncResponse = this.smartMeteringConfigurationClient.getKeys(request);
    assertThat(asyncResponse).as("getKeysAsyncResponse should not be null").isNotNull();
    ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Also used : GetKeysRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysRequest) GetKeysAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with GetKeysRequest

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

the class GetKeysRequestFactory method fromParameterMap.

public static GetKeysRequest fromParameterMap(final Map<String, String> settings) {
    final GetKeysRequest request = new GetKeysRequest();
    final GetKeysRequestData requestData = new GetKeysRequestData();
    requestData.getSecretTypes().addAll(getSecretTypesFromParameterMap(settings));
    request.setDeviceIdentification(settings.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
    request.setGetKeysData(requestData);
    return request;
}
Also used : GetKeysRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysRequest) GetKeysRequestData(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysRequestData)

Aggregations

GetKeysRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysRequest)2 When (io.cucumber.java.en.When)1 GetKeysAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysAsyncResponse)1 GetKeysRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysRequestData)1