Search in sources :

Example 1 with Given

use of io.cucumber.java.en.Given in project grakn by graknlabs.

the class TypeQLSteps method typeql_delete.

@Given("typeql delete")
public void typeql_delete(String deleteQueryStatements) {
    TypeQLDelete typeQLQuery = TypeQL.parseQuery(String.join("\n", deleteQueryStatements)).asDelete();
    tx().query().delete(typeQLQuery);
}
Also used : TypeQLDelete(com.vaticle.typeql.lang.query.TypeQLDelete) Given(io.cucumber.java.en.Given)

Example 2 with Given

use of io.cucumber.java.en.Given in project grakn by graknlabs.

the class TypeQLSteps method typeql_insert.

@Given("typeql insert")
public void typeql_insert(String insertQueryStatements) {
    TypeQLInsert typeQLQuery = TypeQL.parseQuery(String.join("\n", insertQueryStatements)).asInsert();
    tx().query().insert(typeQLQuery);
}
Also used : TypeQLInsert(com.vaticle.typeql.lang.query.TypeQLInsert) Given(io.cucumber.java.en.Given)

Example 3 with Given

use of io.cucumber.java.en.Given in project grakn by graknlabs.

the class ReasonerSteps method data.

@Given("reasoning data")
public void data(String insertQueryStatements) {
    try (CoreSession session = databaseMgr.session(DATABASE, Arguments.Session.Type.DATA)) {
        try (CoreTransaction tx = session.transaction(Arguments.Transaction.Type.WRITE)) {
            tx.query().insert(TypeQL.parseQuery(String.join("\n", insertQueryStatements)).asInsert());
            tx.commit();
        }
    }
}
Also used : CoreSession(com.vaticle.typedb.core.database.CoreSession) CoreTransaction(com.vaticle.typedb.core.database.CoreTransaction) Given(io.cucumber.java.en.Given)

Example 4 with Given

use of io.cucumber.java.en.Given in project syndesis-qe by syndesisio.

the class OperatorValidationSteps method grantPermissions.

@Given("^grant permissions to user$")
public void grantPermissions() {
    Syndesis syndesis = ResourceFactory.get(Syndesis.class);
    syndesis.pullOperatorImage();
    syndesis.grantPermissions();
}
Also used : Syndesis(io.syndesis.qe.resource.impl.Syndesis) Given(io.cucumber.java.en.Given)

Example 5 with Given

use of io.cucumber.java.en.Given in project syndesis-qe by syndesisio.

the class ExtensionHandler method importExtensionFromPath.

@Given("import extension from path {string}")
public void importExtensionFromPath(String path) {
    File extension = new File(path);
    assertThat(extension).exists();
    extensionsEndpoint.installExtension(extensionsEndpoint.uploadExtension(extension));
}
Also used : File(java.io.File) 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