Package org.sonar.core.permission

Examples of org.sonar.core.permission.PermissionQuery$Builder


      "selected", "all"));

    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);
  }
View Full Code Here


      "selected", "all"));

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

    PermissionQuery query = argumentCaptor.getValue();
    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.permission()).isEqualTo("admin");
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }
View Full Code Here

    params.put("component", "org.sample.Sample");
    params.put("query", "text");
    params.put("selected", "all");
    params.put("page", 2);
    params.put("pageSize", 50);
    PermissionQuery query = PermissionQueryParser.toQuery(params);

    assertThat(query.permission()).isEqualTo("admin");
    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.template()).isEqualTo("my_template_key");
    assertThat(query.search()).isEqualTo("text");
    assertThat(query.pageSize()).isEqualTo(50);
    assertThat(query.pageIndex()).isEqualTo(2);
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.permission.PermissionQuery$Builder

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.