use of org.sonar.scanner.bootstrap.ScannerExtensionDictionnary in project sonarqube by SonarSource.
the class SensorsExecutorTest method setUp.
@Before
public void setUp() throws IOException {
context = mock(SensorContext.class);
ScannerExtensionDictionnary selector = mock(ScannerExtensionDictionnary.class);
when(selector.selectSensors(any(DefaultInputModule.class), eq(false))).thenReturn(Collections.singleton(perModuleSensor));
when(selector.selectSensors(any(DefaultInputModule.class), eq(true))).thenReturn(Collections.singleton(globalSensor));
DefaultInputModule rootModule = TestInputFileBuilder.newDefaultInputModule("root", temp.newFolder());
rootModuleExecutor = new SensorsExecutor(selector, rootModule, mock(EventBus.class), strategy);
DefaultInputModule subModule = TestInputFileBuilder.newDefaultInputModule("sub", temp.newFolder());
rootModule.definition().addSubProject(subModule.definition());
subModuleExecutor = new SensorsExecutor(selector, subModule, mock(EventBus.class), strategy);
}
Aggregations