Search in sources :

Example 31 with DefaultInputModule

use of org.sonar.api.batch.fs.internal.DefaultInputModule in project sonarqube by SonarSource.

the class InputFileBuilderTest method setUp.

@Before
public void setUp() throws IOException {
    baseDir = temp.newFolder().toPath();
    DefaultInputModule module = new DefaultInputModule(ProjectDefinition.create().setKey("module1").setBaseDir(baseDir.toFile()), 0);
    PathResolver pathResolver = new PathResolver();
    LanguageDetection langDetection = mock(LanguageDetection.class);
    MetadataGenerator metadataGenerator = mock(MetadataGenerator.class);
    BatchIdGenerator idGenerator = new BatchIdGenerator();
    Settings settings = new MapSettings();
    builder = new InputFileBuilder(module, pathResolver, langDetection, metadataGenerator, idGenerator, settings);
}
Also used : MapSettings(org.sonar.api.config.MapSettings) DefaultInputModule(org.sonar.api.batch.fs.internal.DefaultInputModule) PathResolver(org.sonar.api.scan.filesystem.PathResolver) Settings(org.sonar.api.config.Settings) MapSettings(org.sonar.api.config.MapSettings) Before(org.junit.Before)

Example 32 with DefaultInputModule

use of org.sonar.api.batch.fs.internal.DefaultInputModule in project sonarqube by SonarSource.

the class SymbolizableBuilderTest method project_should_not_be_highlightable.

@Test
public void project_should_not_be_highlightable() {
    SymbolizableBuilder builder = new SymbolizableBuilder(mock(DefaultSensorStorage.class), mock(AnalysisMode.class));
    Perspective perspective = builder.loadPerspective(Symbolizable.class, new DefaultInputModule("struts"));
    assertThat(perspective).isNull();
}
Also used : Perspective(org.sonar.api.component.Perspective) DefaultInputModule(org.sonar.api.batch.fs.internal.DefaultInputModule) DefaultSensorStorage(org.sonar.scanner.sensor.DefaultSensorStorage) AnalysisMode(org.sonar.api.batch.AnalysisMode) Test(org.junit.Test)

Aggregations

DefaultInputModule (org.sonar.api.batch.fs.internal.DefaultInputModule)32 Test (org.junit.Test)19 ProjectDefinition (org.sonar.api.batch.bootstrap.ProjectDefinition)9 TestInputFileBuilder (org.sonar.api.batch.fs.internal.TestInputFileBuilder)9 DefaultInputFile (org.sonar.api.batch.fs.internal.DefaultInputFile)8 InputModuleHierarchy (org.sonar.api.batch.fs.internal.InputModuleHierarchy)7 DefaultInputDir (org.sonar.api.batch.fs.internal.DefaultInputDir)6 ProjectAnalysisInfo (org.sonar.scanner.ProjectAnalysisInfo)6 InputFile (org.sonar.api.batch.fs.InputFile)5 Before (org.junit.Before)4 ScannerReportReader (org.sonar.scanner.protocol.output.ScannerReportReader)4 CheckForNull (javax.annotation.CheckForNull)3 SensorStorage (org.sonar.api.batch.sensor.internal.SensorStorage)3 PathResolver (org.sonar.api.scan.filesystem.PathResolver)3 Component (org.sonar.scanner.protocol.output.ScannerReport.Component)3 ComponentsPublisher (org.sonar.scanner.report.ComponentsPublisher)3 File (java.io.File)2 AnalysisMode (org.sonar.api.batch.AnalysisMode)2 InputComponent (org.sonar.api.batch.fs.InputComponent)2 InputDir (org.sonar.api.batch.fs.InputDir)2