Search in sources :

Example 1 with SeasonProfile

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

the class BundledSetActivityCalendarSteps method theActivityCalendarContainsASeasonProfile.

@Given("^the activity calendar contains a season profile$")
public void theActivityCalendarContainsASeasonProfile(final Map<String, String> parameters) throws Throwable {
    final ActivityCalendar activityCalendar = (ActivityCalendar) ScenarioContext.current().get(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR);
    final String name = parameters.get(PlatformSmartmeteringKeys.SEASON_PROFILE_NAME);
    final String start = parameters.get(PlatformSmartmeteringKeys.SEASON_PROFILE_START);
    final String weekName = parameters.get(PlatformSmartmeteringKeys.SEASON_PROFILE_WEEK_NAME);
    final SeasonProfile profile = new SeasonProfile(name, start, weekName);
    activityCalendar.getSeasonProfiles().put(name, profile);
    ScenarioContext.current().put(PlatformSmartmeteringKeys.ACTIVITY_CALENDAR, activityCalendar);
}
Also used : ActivityCalendar(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.ActivityCalendar) SeasonProfile(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.SeasonProfile) Given(io.cucumber.java.en.Given)

Aggregations

Given (io.cucumber.java.en.Given)1 ActivityCalendar (org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.ActivityCalendar)1 SeasonProfile (org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.SeasonProfile)1