Package org.sonar.api.batch.sensor

Examples of org.sonar.api.batch.sensor.SensorContext.fileSystem()


    fs.add(inputFile);

    SensorContext context = mock(SensorContext.class);
    final SensorStorage sensorStorage = mock(SensorStorage.class);
    when(context.settings()).thenReturn(new Settings());
    when(context.fileSystem()).thenReturn(fs);
    when(context.newIssue()).thenAnswer(new Answer<Issue>() {
      @Override
      public Issue answer(InvocationOnMock invocation) throws Throwable {
        return new DefaultIssue(sensorStorage);
      }
View Full Code Here


    SensorContext context = mock(SensorContext.class);
    final SensorStorage sensorStorage = mock(SensorStorage.class);
    Settings settings = new Settings();
    settings.setProperty(OneIssuePerLineSensor.FORCE_SEVERITY_PROPERTY, "MINOR");
    when(context.settings()).thenReturn(settings);
    when(context.fileSystem()).thenReturn(fs);
    when(context.newIssue()).thenAnswer(new Answer<Issue>() {
      @Override
      public Issue answer(InvocationOnMock invocation) throws Throwable {
        return new DefaultIssue(sensorStorage);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.