use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method I_create_a_new_application_with_name_and_description_based_this_created_template.
@When("^I create a new application with name \"([^\"]*)\" and description \"([^\"]*)\" based on this created template$")
public void I_create_a_new_application_with_name_and_description_based_this_created_template(String name, String description) throws Throwable {
String topologyTemplateId = TopologyTemplateStepDefinitions.CURRENT_TOPOLOGY_TEMP_ID;
assertFalse(StringUtils.isBlank(topologyTemplateId));
createApplication(name, appToArchName(name), description, topologyTemplateId);
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method I_retrieve_the_newly_created_application.
@When("^I retrieve the newly created application$")
public void I_retrieve_the_newly_created_application() throws Throwable {
// App from context
Application contextApp = Context.getInstance().getApplication();
Context.getInstance().registerRestResponse(getRestClientInstance().get("/rest/v1/applications/" + contextApp.getId()));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method I_delete_the_application.
@When("^I delete the application \"([^\"]*)\"$")
public void I_delete_the_application(String applicationName) throws Throwable {
String id = CURRENT_APPLICATION.getName().equals(applicationName) ? CURRENT_APPLICATION.getId() : CURRENT_APPLICATIONS.get(applicationName).getId();
Context.getInstance().registerRestResponse(getRestClientInstance().delete("/rest/v1/applications/" + id));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class ApplicationVersionStepDefinitions method I_search_for_application_versions.
@When("^I search for application versions$")
public void I_search_for_application_versions() throws Throwable {
Application app = Context.getInstance().getApplication();
FilteredSearchRequest request = new FilteredSearchRequest();
request.setFrom(0);
request.setSize(10);
Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/applications/" + app.getId() + "/versions/search", JsonUtil.toString(request)));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class AuditLogStepsDefinitions method I_get_audit_log_configuration.
@When("^I get audit log configuration$")
public void I_get_audit_log_configuration() throws Throwable {
String restResponse = Context.getRestClientInstance().get("/rest/v1/audit/configuration");
AuditConfigurationDTO configuration = JsonUtil.read(restResponse, AuditConfigurationDTO.class).getData();
Assert.assertNotNull(configuration);
currentAuditConfiguration = configuration;
}
Aggregations