use of cucumber.api.java.en.Given in project NoraUi by NoraUi.
the class HelloByeSteps method readBlog.
@RetryOnFailure(attempts = 3)
@Given("me any article, please. '(.*)' of '(.*)'.")
public void readBlog(String jsonArticles, String blog) throws FailureException {
Articles articles = new Articles();
articles.deserialize(jsonArticles);
for (Article article : articles) {
if ("anonymous".equals(article.getAuthor())) {
new Result.Failure<>("anonymous", "anonymous is prohibited in demo blog!!", true, this.demoPage.getCallBack());
} else {
logger.info("> " + blog);
logger.info(" > " + article.getTitle() + ": " + article.getText());
}
}
}
use of cucumber.api.java.en.Given in project ff4j by ff4j.
the class FeatureStoreStepDef method the_following_features_are_cached.
@Given("^the following features are cached$")
public void the_following_features_are_cached(List<FeaturePojo> features) throws Throwable {
for (FeaturePojo featurePojo : features) {
Feature feature = new Feature(featurePojo.getUid(), Boolean.valueOf(featurePojo.getEnable()), featurePojo.getDescription(), featurePojo.getGroup(), Arrays.asList(featurePojo.getPermissions().split(",")));
((FF4jCacheProxy) ff4j.getFeatureStore()).getCacheManager().putFeature(feature);
}
}
use of cucumber.api.java.en.Given in project ff4j by ff4j.
the class FeatureStoreServicesStepDef method the_feature_store_is_cached.
@Given("^the feature store is cached$")
public void the_feature_store_is_cached() throws Throwable {
FF4jCacheProxy proxy = new FF4jCacheProxy(ff4j.getFeatureStore(), null, new InMemoryCacheManager());
ff4j.setFeatureStore(proxy);
}
use of cucumber.api.java.en.Given in project ff4j by ff4j.
the class FeatureStoreServicesStepDef method the_following_features_are_cached.
@Given("^the following features are cached$")
public void the_following_features_are_cached(List<FeaturePojo> features) throws Throwable {
for (FeaturePojo featurePojo : features) {
Feature feature = new Feature(featurePojo.getUid(), Boolean.valueOf(featurePojo.getEnable()), featurePojo.getDescription(), featurePojo.getGroup(), Arrays.asList(featurePojo.getPermissions().split(",")));
((FF4jCacheProxy) ff4j.getFeatureStore()).getCacheManager().putFeature(feature);
}
}
use of cucumber.api.java.en.Given in project vertexium by visallo.
the class GraphGlue method givenHavingExecuted.
@Given("^having executed:$")
public void givenHavingExecuted(String queryString) {
CypherCompilerContext compilerContext = new CypherCompilerContext(ctx.getFunctions());
VertexiumCypherQuery.parse(compilerContext, queryString).execute(ctx);
}
Aggregations