Package org.sonar.server.qualitygate.QgateProjectFinder

Examples of org.sonar.server.qualitygate.QgateProjectFinder.Association


  }

  @Test
  public void search_with_query() throws Exception {
    long gateId = 12345L;
    Association assoc = mock(Association.class);
    when(assoc.hasMoreResults()).thenReturn(true);
    List<ProjectQgateAssociation> projects = ImmutableList.of(
      new ProjectQgateAssociation().setId(42L).setName("Project One").setMember(false),
      new ProjectQgateAssociation().setId(24L).setName("Project Two").setMember(true)
      );
    when(assoc.projects()).thenReturn(projects);
    when(projectFinder.find(any(ProjectQgateAssociationQuery.class))).thenReturn(assoc);

    tester.newGetRequest("api/qualitygates", "search")
      .setParam("gateId", Long.toString(gateId))
      .setParam("query", "Project")
View Full Code Here


  }

  @Test
  public void search_nominal() throws Exception {
    long gateId = 12345L;
    Association assoc = mock(Association.class);
    when(assoc.hasMoreResults()).thenReturn(true);
    List<ProjectQgateAssociation> projects = ImmutableList.of(
      new ProjectQgateAssociation().setId(24L).setName("Project Two").setMember(true)
      );
    when(assoc.projects()).thenReturn(projects);
    when(projectFinder.find(any(ProjectQgateAssociationQuery.class))).thenReturn(assoc);

    tester.newGetRequest("api/qualitygates", "search")
      .setParam("gateId", Long.toString(gateId))
      .execute()
View Full Code Here

TOP

Related Classes of org.sonar.server.qualitygate.QgateProjectFinder.Association

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.