use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequest in project open-smart-grid-platform by OSGP.
the class SetActivityCalendar method theSetActivityCalendarRequestIsReceived.
@When("^the set activity calendar request is received$")
public void theSetActivityCalendarRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final SetActivityCalendarRequest setActivityCalendarRequest = SetActivityCalendarRequestFactory.fromParameterMap(requestData);
final SetActivityCalendarAsyncResponse setActivityCalendarAsyncResponse = this.smartMeteringConfigurationClient.setActivityCalendar(setActivityCalendarRequest);
LOGGER.info("Set activity calendar asyncResponse is received {}", setActivityCalendarAsyncResponse);
assertThat(setActivityCalendarAsyncResponse).as("Set activity calendar asyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setActivityCalendarAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequest in project open-smart-grid-platform by OSGP.
the class SetActivityCalendarRequestFactory method fromParameterMap.
public static SetActivityCalendarRequest fromParameterMap(final Map<String, String> requestParameters) {
final SetActivityCalendarRequest setActivityCalendarRequest = new SetActivityCalendarRequest();
setActivityCalendarRequest.setDeviceIdentification(requestParameters.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
final ActivityCalendarType activityCalendarType = fetchActivityCalendar();
final SetActivityCalendarRequestData setActivityCalendarRequestData = new SetActivityCalendarRequestData();
setActivityCalendarRequestData.setActivityCalendar(activityCalendarType);
setActivityCalendarRequest.setActivityCalendarData(setActivityCalendarRequestData);
return setActivityCalendarRequest;
}
Aggregations