Search in sources :

Example 1 with SetActivityCalendarRequestBuilder

use of org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.SetActivityCalendarRequestBuilder in project open-smart-grid-platform by OSGP.

the class BundledSetActivityCalendarSteps method theBundleRequestContainsASetActivityCalendarAction.

@Given("^the bundle request contains a set activity calendar action$")
public void theBundleRequestContainsASetActivityCalendarAction() throws Throwable {
    SetActivityCalendarRequest action;
    if (ScenarioContext.current().get(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR) == null) {
        action = new SetActivityCalendarRequestBuilder().withDefaults().build();
    } else {
        final ActivityCalendar activityCalendar = (ActivityCalendar) ScenarioContext.current().get(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR);
        action = new SetActivityCalendarRequestBuilder().withActivityCalendar(activityCalendar).build();
    }
    this.addActionToBundleRequest(action);
}
Also used : ActivityCalendar(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.ActivityCalendar) SetActivityCalendarRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.SetActivityCalendarRequest) SetActivityCalendarRequestBuilder(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.SetActivityCalendarRequestBuilder) Given(io.cucumber.java.en.Given)

Aggregations

Given (io.cucumber.java.en.Given)1 SetActivityCalendarRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.SetActivityCalendarRequest)1 SetActivityCalendarRequestBuilder (org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.SetActivityCalendarRequestBuilder)1 ActivityCalendar (org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.ActivityCalendar)1