Package org.sonar.server.ws

Examples of org.sonar.server.ws.WsTester$Result


    when(i18n.getPropertyKeys()).thenReturn(ImmutableSet.of(key1, key2, key3));
    when(i18n.message(locale, key1, key1)).thenReturn(key1);
    when(i18n.message(locale, key2, key2)).thenReturn(key2);
    when(i18n.message(locale, key3, key3)).thenReturn(key3);

    Result result = new WsTester(new L10nWs(i18n, server)).newGetRequest("api/l10n", "index").setParam("ts", DateUtils.formatDateTime(aBitEarlier)).execute();
    verify(i18n).getPropertyKeys();
    verify(i18n).message(locale, key1, key1);
    verify(i18n).message(locale, key2, key2);
    verify(i18n).message(locale, key3, key3);
View Full Code Here


    when(i18n.getPropertyKeys()).thenReturn(ImmutableSet.of(key1, key2, key3));
    when(i18n.message(override, key1, key1)).thenReturn(key1);
    when(i18n.message(override, key2, key2)).thenReturn(key2);
    when(i18n.message(override, key3, key3)).thenReturn(key3);

    Result result = new WsTester(new L10nWs(i18n, server)).newGetRequest("api/l10n", "index").setParam("locale", override.toString()).execute();
    verify(i18n).getPropertyKeys();
    verify(i18n).message(override, key1, key1);
    verify(i18n).message(override, key2, key2);
    verify(i18n).message(override, key3, key3);
View Full Code Here

  WebService.Controller controller;

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

  WsTester tester;

  @Before
  public void setUp() throws Exception {
    tester = new WsTester(new ServerWs());
  }
View Full Code Here

  WsTester tester;

  @Before
  public void setUp() {
    tester = new WsTester(new QGatesWs(
      new QGatesListAction(qGates), new QGatesShowAction(qGates), new QGatesSearchAction(mock(QgateProjectFinder.class)),
      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, periods, i18n)));
View Full Code Here

  WsTester tester;

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

  WsTester tester;

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

  WsTester tester;

  @Before
  public void before() throws IOException {
    tester = new WsTester(new BatchWs(batchIndex,
      new GlobalReferentialsAction(mock(DbClient.class), mock(PropertiesDao.class)),
      new ProjectReferentialsAction(mock(DbClient.class), mock(PropertiesDao.class), mock(QProfileFactory.class), mock(QProfileLoader.class), mock(RuleService.class),
        mock(Languages.class)),
      new UploadReportAction(mock(AnalysisReportQueue.class), mock(ComputationService.class), mock(AnalysisReportTaskLauncher.class))));
  }
View Full Code Here

  public void setUp() throws Exception {
    DbClient dbClient = mock(DbClient.class);
    when(dbClient.openSession(false)).thenReturn(session);
    when(dbClient.metricDao()).thenReturn(metricDao);

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

  WebService.Controller controller;

  @Before
  public void setUp() throws Exception {
    SnapshotPerspectives snapshotPerspectives = mock(SnapshotPerspectives.class);
    WsTester tester = new WsTester(new TestsWs(new TestsShowAction(mock(DbClient.class), snapshotPerspectives), new TestsTestCasesAction(snapshotPerspectives), new TestsCoveredFilesAction(snapshotPerspectives)));
    controller = tester.controller("api/tests");
  }
View Full Code Here

TOP

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

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.