use of alien4cloud.it.Entry in project alien4cloud by alien4cloud.
the class AuthenticationStepDefinitions method I_update_user_s_fields.
@When("^I update \"([^\"]*)\" user's fields:$")
public void I_update_user_s_fields(String username, List<Entry> fields) throws Throwable {
Map<String, String> fieldsMap = Maps.newHashMap();
for (Entry field : fields) {
fieldsMap.put(field.getName(), field.getValue());
}
String resp = Context.getRestClientInstance().putJSon("/rest/v1/users/" + username, JsonUtil.toString(fieldsMap));
System.out.println(resp);
Context.getInstance().registerRestResponse(resp);
}
use of alien4cloud.it.Entry in project alien4cloud by alien4cloud.
the class GroupsStepDefinitions method I_update_the_group_fields.
@When("^I update the \"([^\"]*)\" group fields:$")
public void I_update_the_group_fields(String name, List<Entry> fields) throws Throwable {
Map<String, String> fieldsMap = Maps.newHashMap();
for (Entry field : fields) {
fieldsMap.put(field.getName(), field.getValue());
}
Context.getInstance().registerRestResponse(Context.getRestClientInstance().putJSon("/rest/v1/groups/" + Context.getInstance().getGroupId(name), JsonUtil.toString(fieldsMap)));
}