use of alien4cloud.model.application.Application in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method the_application_can_be_found_in_ALIEN_with_its_new_image.
@Then("^the application can be found in ALIEN with its new image$")
public void the_application_can_be_found_in_ALIEN_with_its_new_image() throws Throwable {
Application app = the_application_can_be_found_in_ALIEN();
assertNotNull(app.getImageId());
}
use of alien4cloud.model.application.Application in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method I_have_and_a_tag.
@Given("^I have an application tag \"([^\"]*)\"$")
public boolean I_have_and_a_tag(String tag) throws Throwable {
Context.getInstance().registerRestResponse(getRestClientInstance().get("/rest/v1/applications/" + CURRENT_APPLICATION.getId()));
Application application = JsonUtil.read(Context.getInstance().takeRestResponse(), Application.class).getData();
assertTrue(application.getTags().contains(new Tag(tag, null)));
return application.getTags().contains(new Tag(tag, null));
}
use of alien4cloud.model.application.Application in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method The_application_update_date_has_changed.
@Then("^The application update date has changed$")
public void The_application_update_date_has_changed() throws Throwable {
Application application = CURRENT_APPLICATION;
Assert.assertNotEquals(application.getCreationDate(), application.getLastUpdateDate());
}
use of alien4cloud.model.application.Application in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method I_should_receive_an_application_without_as_user.
@Then("^I should receive an application without \"([^\"]*)\" as user$")
public void I_should_receive_an_application_without_as_user(String userName) throws Throwable {
RestResponse<Application> response = JsonUtil.read(Context.getInstance().getRestResponse(), Application.class);
Assert.assertNull(response.getError());
Assert.assertNotNull(response.getData());
Application application = response.getData();
if (application.getUserRoles() != null) {
Assert.assertFalse(application.getUserRoles().containsKey(userName));
}
}
use of alien4cloud.model.application.Application in project alien4cloud by alien4cloud.
the class ApplicationStepDefinitions method The_application_can_be_found_in_ALIEN_with_its_set_to.
@And("^The application can be found in ALIEN with its \"([^\"]*)\" set to \"([^\"]*)\"$")
public void The_application_can_be_found_in_ALIEN_with_its_set_to(String fieldName, String fieldValue) throws Throwable {
Application application = the_application_can_be_found_in_ALIEN();
Assert.assertEquals(fieldValue, ReflectionUtil.getPropertyValue(application, fieldName).toString());
}
Aggregations