Package org.sonar.api.batch.sensor.internal

Examples of org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor


  private AnalyzerOptimizer optimizer;

  public SensorWrapper(Sensor newSensor, SensorContext adaptor, AnalyzerOptimizer optimizer) {
    this.wrappedSensor = newSensor;
    this.optimizer = optimizer;
    descriptor = new DefaultSensorDescriptor();
    newSensor.describe(descriptor);
    this.adaptor = adaptor;
  }
View Full Code Here


public class DefaultSensorDescriptorTest {

  @Test
  public void describe() {
    DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor();
    descriptor
      .name("Foo")
      .dependsOn(CoreMetrics.NCLOC)
      .provides(CoreMetrics.BLOCKER_VIOLATIONS)
      .workOnLanguages("java", "php")
      .workOnFileTypes(InputFile.Type.MAIN);

    assertThat(descriptor.name()).isEqualTo("Foo");
    assertThat(descriptor.dependsOn()).containsOnly(CoreMetrics.NCLOC);
    assertThat(descriptor.provides()).containsOnly(CoreMetrics.BLOCKER_VIOLATIONS);
    assertThat(descriptor.languages()).containsOnly("java", "php");
    assertThat(descriptor.types()).containsOnly(InputFile.Type.MAIN);
  }
View Full Code Here

  private OneIssuePerLineSensor sensor = new OneIssuePerLineSensor();

  @Test
  public void testDescriptor() {
    DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor();
    sensor.describe(descriptor);
    assertThat(descriptor.ruleRepositories()).containsOnly(XooRulesDefinition.XOO_REPOSITORY);
  }
View Full Code Here

    when(context.fileSystem()).thenReturn(fileSystem);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    when(context.fileSystem()).thenReturn(fileSystem);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    });
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    when(context.fileSystem()).thenReturn(fileSystem);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    when(context.fileSystem()).thenReturn(fileSystem);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    when(context.settings()).thenReturn(settings);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

    when(context.fileSystem()).thenReturn(fileSystem);
  }

  @Test
  public void testDescriptor() {
    sensor.describe(new DefaultSensorDescriptor());
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.