Package org.sonar.api.test

Examples of org.sonar.api.test.MutableTestable


    ScanGraph graph = ScanGraph.create();
    TestablePerspectiveLoader loader = new TestablePerspectiveLoader();
    TestableBuilder builder = new TestableBuilder(graph, loader);
    ComponentVertex file = graph.addComponent(MockSourceFile.createMain("org.foo.Bar"));

    MutableTestable testable = builder.create(file);
    assertThat(testable).isNotNull();
    assertThat(testable.component()).isSameAs(file);
    assertThat(builder.getPerspectiveLoader().load(file)).isSameAs(testable);
  }
View Full Code Here


    verify(measureDao).getNullableByKey(session, MeasureKey.of(COMPONENT_KEY, CoreMetrics.OVERALL_COVERED_CONDITIONS_BY_LINE_KEY));
  }

  @Test
  public void get_test_cases_by_lines() throws Exception {
    MutableTestable testable = mock(MutableTestable.class);
    when(snapshotPerspectives.as(MutableTestable.class, COMPONENT_KEY)).thenReturn(testable);

    service.getTestCases(COMPONENT_KEY, CoverageService.TYPE.UT);
    verify(testable).testCasesByLines();
View Full Code Here

TOP

Related Classes of org.sonar.api.test.MutableTestable

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.