Examples of lines()


Examples of org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile.lines()

    putUTFOrNull(value, f.absolutePath());
    value.putString(f.language());
    value.putString(f.type().name());
    value.putString(f.status().name());
    putUTFOrNull(value, f.hash());
    value.put(f.lines());
  }

  private void putUTFOrNull(Value value, @Nullable String utfOrNull) {
    if (utfOrNull != null) {
      value.putUTF(utfOrNull);
View Full Code Here

Examples of org.sonar.api.test.CoverageBlock.lines()

    assertThat(testCase.coverageBlocks()).hasSize(1);

    CoverageBlock cover = Iterables.getFirst(testCase.coverageBlocks(), null);
    assertThat(cover.testCase()).isEqualTo(testCase);
    assertThat(cover.testable()).isSameAs(testable);
    assertThat(cover.lines()).containsExactly(10, 11, 12);
  }

  @Test
  public void should_cover_multiple_testables() {
    ScanGraph graph = ScanGraph.create();
View Full Code Here

Examples of org.sonar.api.test.CoverageBlock.lines()

    Testable testable = mock(Testable.class);
    when(testable.component()).thenReturn(new ComponentDto().setKey(fileKey).setLongName(fileLongName));

    CoverageBlock block = mock(CoverageBlock.class);
    when(block.testable()).thenReturn(testable);
    when(block.lines()).thenReturn(Arrays.asList(new Integer[coveredLines]));

    MutableTestCase testCase = mock(MutableTestCase.class);
    when(testCase.coverageBlocks()).thenReturn(newArrayList(block));
    return testCase;
  }
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.