Search in sources :

Example 1 with SetActivityCalendarRequest

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());
}
Also used : SetActivityCalendarRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequest) SetActivityCalendarAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with SetActivityCalendarRequest

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;
}
Also used : SetActivityCalendarRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequest) ActivityCalendarType(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ActivityCalendarType) SetActivityCalendarRequestData(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequestData)

Aggregations

SetActivityCalendarRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequest)2 When (io.cucumber.java.en.When)1 ActivityCalendarType (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ActivityCalendarType)1 SetActivityCalendarAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarAsyncResponse)1 SetActivityCalendarRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetActivityCalendarRequestData)1