Search in sources :

Example 1 with SetAlarmNotificationsRequest

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

the class SetAlarmNotifications method theSetAlarmNotificationsRequestIsReceived.

@When("^the set alarm notifications request is received$")
public void theSetAlarmNotificationsRequestIsReceived(final Map<String, String> requestData) throws Throwable {
    final SetAlarmNotificationsRequest setAlarmNotificationsRequest = SetAlarmNotificationsRequestFactory.fromParameterMap(requestData);
    final SetAlarmNotificationsAsyncResponse setAlarmNotificationsAsyncResponse = this.smartMeteringConfigurationClient.setAlarmNotifications(setAlarmNotificationsRequest);
    LOGGER.info("Set alarm notifications response is received {}", setAlarmNotificationsAsyncResponse);
    assertThat(setAlarmNotificationsAsyncResponse).as("Set alarm notifications response should not be null").isNotNull();
    ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setAlarmNotificationsAsyncResponse.getCorrelationUid());
}
Also used : SetAlarmNotificationsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAlarmNotificationsRequest) SetAlarmNotificationsAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAlarmNotificationsAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with SetAlarmNotificationsRequest

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

the class SetAlarmNotificationsRequestFactory method fromParameterMap.

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

Aggregations

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