use of org.apache.ranger.view.RangerPolicyList in project ranger by apache.
the class TestServiceDBStore method test30getPolicies.
@Test
public void test30getPolicies() throws Exception {
SearchFilter filter = new SearchFilter();
filter.setParam(SearchFilter.POLICY_NAME, "policyName");
filter.setParam(SearchFilter.SERVICE_NAME, "serviceName");
List<RangerPolicy> rangerPolicyLists = new ArrayList<RangerPolicy>();
RangerPolicy rangerPolicy = rangerPolicy();
rangerPolicyLists.add(rangerPolicy);
RangerPolicyList policyListObj = new RangerPolicyList();
policyListObj.setPageSize(0);
policyListObj.setResultSize(1);
policyListObj.setSortBy("asc");
policyListObj.setSortType("1");
policyListObj.setStartIndex(0);
policyListObj.setTotalCount(10);
List<RangerPolicy> dbRangerPolicy = serviceDBStore.getPolicies(filter);
Assert.assertNotNull(dbRangerPolicy);
}
Aggregations