Search in sources :

Example 41 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 42 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 43 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 44 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)

Example 45 with Given

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

the class BundledSetAlarmNotificationsSteps method theBundleRequestContainsASetAlarmNotificationsAction.

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

Aggregations

Given (io.cucumber.java.en.Given)251 ReadSettingsHelper.getString (org.opensmartgridplatform.cucumber.core.ReadSettingsHelper.getString)27 File (java.io.File)19 ArrayList (java.util.ArrayList)13 CitrusResource (com.consol.citrus.annotations.CitrusResource)12 CitrusRuntimeException (com.consol.citrus.exceptions.CitrusRuntimeException)11 Transactional (org.springframework.transaction.annotation.Transactional)11 IOException (java.io.IOException)10 HashMap (java.util.HashMap)10 ExpandedAccountId (com.hedera.mirror.test.e2e.acceptance.props.ExpandedAccountId)9 Map (java.util.Map)9 Citrus (com.consol.citrus.Citrus)8 TestCaseRunner (com.consol.citrus.TestCaseRunner)8 CitrusFramework (com.consol.citrus.annotations.CitrusFramework)8 TestContext (com.consol.citrus.context.TestContext)8 Before (io.cucumber.java.Before)8 Scenario (io.cucumber.java.Scenario)8 Date (java.util.Date)8 Ssld (org.opensmartgridplatform.domain.core.entities.Ssld)8 Resource (org.springframework.core.io.Resource)8