use of alien4cloud.dao.model.GetMultipleDataResult in project alien4cloud by alien4cloud.
the class UserService method countAdminUser.
@SuppressWarnings("rawtypes")
public int countAdminUser() {
Map<String, String[]> filters = new HashMap<String, String[]>();
filters.put("roles", new String[] { Role.ADMIN.toString() });
GetMultipleDataResult searchResult = alienUserDao.find(filters, 1);
return (int) searchResult.getTotalResults();
}
use of alien4cloud.dao.model.GetMultipleDataResult in project alien4cloud by alien4cloud.
the class UsersDefinitionsSteps method there_should_be_users_in_the_response.
@Then("^there should be (\\d+) users in the response$")
public void there_should_be_users_in_the_response(int expectedSize) throws Throwable {
RestResponse<FacetedSearchResult> restResponse = JsonUtil.read(Context.getInstance().takeRestResponse(), FacetedSearchResult.class);
GetMultipleDataResult searchResp = restResponse.getData();
assertNotNull(searchResp);
assertNotNull(searchResp.getTypes());
assertNotNull(searchResp.getData());
assertEquals(expectedSize, searchResp.getTypes().length);
assertEquals(expectedSize, searchResp.getData().length);
}
Aggregations