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());
}
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;
}
Aggregations