use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class SecretPropertiesStepDefinitions method iDefineThePropertyOfRelationshipFromTheNodeAsSecretWithASecretPathAndISaveTheTopology.
@When("^I define the property \"([^\"]*)\" of relationship \"([^\"]*)\" from the node \"([^\"]*)\" as secret with a secret path \"([^\"]*)\" and I save the topology$")
public void iDefineThePropertyOfRelationshipFromTheNodeAsSecretWithASecretPathAndISaveTheTopology(String propertyName, String relationshipName, String nodeName, String secretPath) throws Throwable {
SetRelationshipPropertyAsSecretOperation operation = new SetRelationshipPropertyAsSecretOperation();
operation.setNodeName(nodeName);
operation.setRelationshipName(relationshipName);
operation.setPropertyName(propertyName);
operation.setSecretPath(secretPath);
EditorStepDefinitions.do_i_execute_the_operation(operation);
EditorStepDefinitions.do_i_save_the_topology();
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class SearchDefinitionSteps method I_search_for_from_with_result_size_of.
@When("^I search for \"([^\"]*)\" from (\\d+) with result size of (\\d+)$")
public void I_search_for_from_with_result_size_of(String searchedComponentType, int from, int size) throws Throwable {
ComponentSearchRequest req = new ComponentSearchRequest(QUERY_TYPES.get(searchedComponentType), null, from, size, null);
String jSon = JsonUtil.toString(req);
Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/search", jSon));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class SearchDefinitionSteps method I_search_for_from_with_result_size_of_and_filter_set_to.
@When("^I search for \"([^\"]*)\" from (\\d+) with result size of (\\d+) and filter \"([^\"]*)\" set to \"([^\"]*)\"$")
public void I_search_for_from_with_result_size_of_and_filter_set_to(String searchedComponentType, int from, int size, String filterName, String filterValue) throws Throwable {
Map<String, String[]> filters = Maps.newHashMap();
filters.put(filterName, new String[] { filterValue });
ComponentSearchRequest req = new ComponentSearchRequest(QUERY_TYPES.get(searchedComponentType), null, from, size, filters);
req.setType(req.getType());
String jSon = JsonUtil.toString(req);
Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/search", jSon));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class SearchDefinitionSteps method I_make_a_basic_search_for_from_with_result_size_of.
@When("^I make a basic \"([^\"]*)\" search for \"([^\"]*)\" from (\\d+) with result size of (\\d+)$")
public void I_make_a_basic_search_for_from_with_result_size_of(String query, String searchedComponentType, int from, int size) throws Throwable {
// BasicSearchRequest req = new BasicSearchRequest(query, from, size);
ComponentSearchRequest req = new ComponentSearchRequest(QUERY_TYPES.get(searchedComponentType), query, from, size, null);
String jSon = JsonUtil.toString(req);
Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/search", jSon));
}
use of cucumber.api.java.en.When in project alien4cloud by alien4cloud.
the class UpdateDeleteTagDefinitionsSteps method I_update_a_tag_with_key_and_value.
@When("^I update a tag with key \"([^\"]*)\" and value \"([^\"]*)\"$")
public void I_update_a_tag_with_key_and_value(String tagKey, String tagValue) throws Throwable {
UpdateTagRequest updateTagRequest = new UpdateTagRequest();
updateTagRequest.setTagKey(tagKey);
updateTagRequest.setTagValue(tagValue);
Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/" + Context.getInstance().getComponentId(0) + "/tags", jsonMapper.writeValueAsString(updateTagRequest)));
}
Aggregations