use of org.sonar.server.ws.WsActionTester in project sonarqube by SonarSource.
the class ComponentActionTest method init.
private void init(Page... pages) {
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 ComponentAction(dbClient, pageRepository, resourceTypes, userSession, new ComponentFinder(dbClient), new QualityGateFinder(dbClient)));
}
use of org.sonar.server.ws.WsActionTester in project sonarqube by SonarSource.
the class UploadActionTest method setUp.
@Before
public void setUp() throws Exception {
pluginDirectory = folder.newFolder();
when(fileSystem.getDownloadedPluginsDir()).thenReturn(pluginDirectory);
wsTester = new WsActionTester(new UploadAction(userSession, fileSystem));
}
Aggregations