Examples of component()


Examples of org.sonar.api.test.MutableTestPlan.component()

    TestPlanBuilder builder = new TestPlanBuilder(graph, loader);
    ComponentVertex file = graph.addComponent(MockSourceFile.createMain("org.foo.Bar"));

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

Examples of org.sonar.api.test.MutableTestable.component()

    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

Examples of org.sonar.api.test.TestPlan.component()

    when(testCase.name()).thenReturn(name);
    when(testCase.status()).thenReturn(status);
    when(testCase.durationInMs()).thenReturn(durationInMs);

    TestPlan testPlan = mock(TestPlan.class);
    when(testPlan.component()).thenReturn(new ComponentDto().setKey(testPlanKey).setLongName(testPlanLongName));
    when(testCase.testPlan()).thenReturn(testPlan);
    return testCase;
  }

}
View Full Code Here

Examples of org.sonar.api.test.Testable.component()

      "}\n");
  }

  private MutableTestCase testCase(String fileKey, String fileLongName, int coveredLines) {
    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]));
View Full Code Here

Examples of org.sonar.core.permission.PermissionQuery.component()

    ArgumentCaptor<PermissionQuery> argumentCaptor = ArgumentCaptor.forClass(PermissionQuery.class);
    verify(finder).findUsersWithPermission(argumentCaptor.capture());

    PermissionQuery query = argumentCaptor.getValue();
    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.permission()).isEqualTo("user");
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }

  @Test
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.