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);
}
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);
}
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();
}
}
}
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();
}
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));
}
Aggregations