Package org.sonar.server.ws

Examples of org.sonar.server.ws.WsTester


  WebService.Controller controller;

  @Before
  public void setUp() throws Exception {
    WsTester tester = new WsTester(new CoverageWs(new CoverageShowAction(mock(CoverageService.class))));
    controller = tester.controller("api/coverage");
  }
View Full Code Here


    when(qProfileFactory.getDefault(session, "java")).thenReturn(
      QualityProfileDto.createFor("abcd").setName("Default").setLanguage("java").setRulesUpdatedAt("2014-01-14T14:00:00+0200")
      );

    tester = new WsTester(new BatchWs(mock(BatchIndex.class), mock(GlobalReferentialsAction.class),
      new ProjectReferentialsAction(dbClient, propertiesDao, qProfileFactory, qProfileLoader, ruleService, languages), mock(UploadReportAction.class)));
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    SnapshotPerspectives snapshotPerspectives = mock(SnapshotPerspectives.class);
    when(snapshotPerspectives.as(MutableTestPlan.class, TEST_PLAN_KEY)).thenReturn(testPlan);
    tester = new WsTester(new TestsWs(mock(TestsShowAction.class), mock(TestsTestCasesAction.class), new TestsCoveredFilesAction(snapshotPerspectives)));
  }
View Full Code Here

  private WsTester tester;

  @Before
  public void setUp() throws Exception {
    this.tester = new WsTester(new AnalysisReportWebService(new ActiveAnalysisReportsAction(mock(AnalysisReportQueue.class)), new IsAnalysisReportQueueEmptyAction(
      mock(AnalysisReportQueue.class)), new AnalysisReportHistorySearchAction(mock(ActivityService.class), mock(ActivityMapping.class))));
  }
View Full Code Here

  private AnalysisReportQueue queue;

  @Before
  public void setup() throws Exception {
    queue = mock(AnalysisReportQueue.class);
    tester = new WsTester(new AnalysisReportWebService(new ActiveAnalysisReportsAction(queue), new IsAnalysisReportQueueEmptyAction(queue),
      mock(AnalysisReportHistorySearchAction.class)));
  }
View Full Code Here

  WsTester tester;

  @Before
  public void setUp() throws Exception {
    action = new FavoritesAction(service);
    tester = new WsTester(new IssueFilterWs(mock(AppAction.class), mock(ShowAction.class), action));
  }
View Full Code Here

  WsTester tester;

  @Before
  public void setUp() {
    tester = new WsTester(new QGatesWs(
      new QGatesListAction(qGates), new QGatesShowAction(qGates), new QGatesSearchAction(projectFinder),
      new QGatesCreateAction(qGates), new QGatesCopyAction(qGates), new QGatesDestroyAction(qGates), new QGatesRenameAction(qGates),
      new QGatesSetAsDefaultAction(qGates), new QGatesUnsetDefaultAction(qGates),
      new QGatesCreateConditionAction(qGates), new QGatesUpdateConditionAction(qGates), new QGatesDeleteConditionAction(qGates),
      new QGatesSelectAction(qGates), new QGatesDeselectAction(qGates), new QGatesAppAction(qGates, mock(Periods.class), mock(I18n.class))));
View Full Code Here

  @Before
  public void setUp() throws Exception {
    QProfileService profileService = mock(QProfileService.class);
    RuleService ruleService = mock(RuleService.class);
    tester = new WsTester(new QProfilesWs(
      new QProfileRestoreBuiltInAction(this.profileService),
      new RuleActivationActions(profileService),
      new BulkRuleActivationActions(profileService, ruleService, i18n)));
  }
View Full Code Here

  @Before
  public void setUp() {
    QProfileService profileService = mock(QProfileService.class);
    RuleService ruleService = mock(RuleService.class);
    I18n i18n = mock(I18n.class);
    controller = new WsTester(new QProfilesWs(new QProfileRestoreBuiltInAction(
      mock(QProfileService.class)),
      new RuleActivationActions(profileService),
      new BulkRuleActivationActions(profileService, ruleService, i18n)
    )).controller(QProfilesWs.API_ENDPOINT);
  }
View Full Code Here

  WebService.Controller controller;

  @Before
  public void setUp() throws Exception {
    WsTester tester = new WsTester(new ResourcesWs());
    controller = tester.controller("api/resources");
  }
View Full Code Here

TOP

Related Classes of org.sonar.server.ws.WsTester

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.