use of org.pentaho.platform.web.http.api.resources.StringListWrapper in project pentaho-platform by pentaho.
the class FileServiceTest method testDoGetPathsAccessList.
@Test
public void testDoGetPathsAccessList() {
List<String> paths = new ArrayList<String>();
paths.add("path1");
paths.add("path2");
paths.add("path3");
doReturn(true).when(fileService.repository).hasAccess(anyString(), any(EnumSet.class));
List<Setting> settings = fileService.doGetPathsAccessList(new StringListWrapper(paths));
assertTrue(settings.size() > 0);
doReturn(false).when(fileService.repository).hasAccess(anyString(), any(EnumSet.class));
settings = fileService.doGetPathsAccessList(new StringListWrapper(paths));
assertEquals(0, settings.size());
}
Aggregations