Search in sources :

Example 16 with Given

use of io.cucumber.java.en.Given in project open-smart-grid-platform by OSGP.

the class BundledSetPushSetupAlarmSteps method theBundleRequestContainsASetPushSetupAlarmAction.

@Given("^the bundle request contains a set push setup alarm action with parameters$")
public void theBundleRequestContainsASetPushSetupAlarmAction(final Map<String, String> parameters) throws Throwable {
    final SetPushSetupAlarmRequest action = new SetPushSetupAlarmRequestBuilder().fromParameterMap(parameters).build();
    this.addActionToBundleRequest(action);
}
Also used : SetPushSetupAlarmRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.SetPushSetupAlarmRequest) SetPushSetupAlarmRequestBuilder(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.SetPushSetupAlarmRequestBuilder) Given(io.cucumber.java.en.Given)

Example 17 with Given

use of io.cucumber.java.en.Given in project open-smart-grid-platform by OSGP.

the class BundledSetPushSetupAlarmSteps method theBundleRequestContainsASetPushSetupAlarmAction.

@Given("^the bundle request contains a set push setup alarm action$")
public void theBundleRequestContainsASetPushSetupAlarmAction() throws Throwable {
    final SetPushSetupAlarmRequest action = new SetPushSetupAlarmRequestBuilder().withDefaults().build();
    this.addActionToBundleRequest(action);
}
Also used : SetPushSetupAlarmRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.SetPushSetupAlarmRequest) SetPushSetupAlarmRequestBuilder(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.SetPushSetupAlarmRequestBuilder) Given(io.cucumber.java.en.Given)

Example 18 with Given

use of io.cucumber.java.en.Given in project open-smart-grid-platform by OSGP.

the class BundleSteps method aABundleRequest.

@Given("^a bundle request$")
public void aABundleRequest(final Map<String, String> settings) throws Throwable {
    final BundleRequest request = new BundleRequest();
    request.setDeviceIdentification(getString(settings, PlatformSmartmeteringKeys.DEVICE_IDENTIFICATION, PlatformSmartmeteringDefaults.DEVICE_IDENTIFICATION));
    final Actions actions = new Actions();
    request.setActions(actions);
    ScenarioContext.current().put(PlatformSmartmeteringKeys.BUNDLE_REQUEST, request);
}
Also used : Actions(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.Actions) BundleRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleRequest) Given(io.cucumber.java.en.Given)

Example 19 with Given

use of io.cucumber.java.en.Given in project open-smart-grid-platform by OSGP.

the class BundledFindEventsSteps method theBundleRequestContainsAFindEventsAction.

@Given("^the bundle request contains a find events action with parameters$")
public void theBundleRequestContainsAFindEventsAction(final Map<String, String> parameters) throws Throwable {
    final FindEventsRequest action = new FindEventsRequestBuilder().fromParameterMap(parameters).build();
    this.addActionToBundleRequest(action);
}
Also used : FindEventsRequestBuilder(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.FindEventsRequestBuilder) FindEventsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FindEventsRequest) Given(io.cucumber.java.en.Given)

Example 20 with Given

use of io.cucumber.java.en.Given in project open-smart-grid-platform by OSGP.

the class BundledFindEventsSteps method theBundleRequestContainsAFindEventsAction.

@Given("^the bundle request contains a find events action$")
public void theBundleRequestContainsAFindEventsAction() throws Throwable {
    final FindEventsRequest action = new FindEventsRequestBuilder().withDefaults().build();
    this.addActionToBundleRequest(action);
}
Also used : FindEventsRequestBuilder(org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.FindEventsRequestBuilder) FindEventsRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FindEventsRequest) Given(io.cucumber.java.en.Given)

Aggregations

Given (io.cucumber.java.en.Given)125 ReadSettingsHelper.getString (org.opensmartgridplatform.cucumber.core.ReadSettingsHelper.getString)27 ArrayList (java.util.ArrayList)11 Transactional (org.springframework.transaction.annotation.Transactional)11 Ssld (org.opensmartgridplatform.domain.core.entities.Ssld)8 Date (java.util.Date)7 DeviceOutputSetting (org.opensmartgridplatform.domain.core.entities.DeviceOutputSetting)6 ActivityCalendar (org.opensmartgridplatform.cucumber.platform.smartmetering.support.ws.smartmetering.bundle.activitycalendar.ActivityCalendar)5 Device (org.opensmartgridplatform.domain.core.entities.Device)5 RelayType (org.opensmartgridplatform.domain.core.valueobjects.RelayType)5 ByteString (com.google.protobuf.ByteString)4 Account (io.syndesis.qe.account.Account)4 File (java.io.File)4 List (java.util.List)4 ElementsCollection (com.codeborne.selenide.ElementsCollection)3 Field (java.lang.reflect.Field)3 HashMap (java.util.HashMap)3 ResponseData (org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData)3 ResponseDataBuilder (org.opensmartgridplatform.cucumber.platform.glue.steps.database.ws.ResponseDataBuilder)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2