use of org.sonar.api.resources.ResourceTypes in project sonarqube by SonarSource.
the class GlobalActionTest method init.
private void init(org.sonar.api.web.page.Page[] pages, ResourceTypeTree[] resourceTypeTrees) {
when(dbClient.getDatabase().getDialect()).thenReturn(new H2());
when(server.getVersion()).thenReturn("6.42");
PluginRepository pluginRepository = mock(PluginRepository.class);
when(pluginRepository.hasPlugin(anyString())).thenReturn(true);
PageRepository pageRepository = new PageRepository(pluginRepository, new PageDefinition[] { context -> {
for (Page page : pages) {
context.addPage(page);
}
} });
pageRepository.start();
ws = new WsActionTester(new GlobalAction(pageRepository, settings, new ResourceTypes(resourceTypeTrees), server, dbClient, organizationFlags));
}
Aggregations