Search in sources :

Example 1 with SetAdministrativeStatusRequest

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

the class SetAdministrativeStatus method theSetAdministrativeStatusRequestIsReceived.

@When("^the set administrative status request is received$")
public void theSetAdministrativeStatusRequestIsReceived(final Map<String, String> requestData) throws Throwable {
    final SetAdministrativeStatusRequest setAdministrativeStatusRequest = SetAdministrativeStatusRequestFactory.fromParameterMap(requestData);
    final SetAdministrativeStatusAsyncResponse setAdministrativeStatusAsyncResponse = this.smartMeteringConfigurationClient.setAdministrativeStatus(setAdministrativeStatusRequest);
    LOGGER.info("Set administrative status response is received {}", setAdministrativeStatusAsyncResponse);
    assertThat(setAdministrativeStatusAsyncResponse).as("Set administrative status response should not be null").isNotNull();
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setAdministrativeStatusAsyncResponse.getCorrelationUid());
}
Also used : SetAdministrativeStatusAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusAsyncResponse) SetAdministrativeStatusRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusRequest) When(io.cucumber.java.en.When)

Example 2 with SetAdministrativeStatusRequest

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

the class SetAdministrativeStatusRequestFactory method fromParameterMap.

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

Aggregations

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