Search in sources :

Example 6 with NameKey

use of com.google.gerrit.reviewdb.client.Project.NameKey in project gerrit by GerritCodeReview.

the class RepositoryConfigTest method ownerGroupsForStarFilter.

@Test
public void ownerGroupsForStarFilter() {
    ImmutableList<String> ownerGroups = ImmutableList.of("group1", "group2");
    configureOwnerGroups("*", ownerGroups);
    assertThat(repoCfg.getOwnerGroups(new NameKey("someProject"))).containsExactlyElementsIn(ownerGroups);
}
Also used : NameKey(com.google.gerrit.reviewdb.client.Project.NameKey) Test(org.junit.Test)

Example 7 with NameKey

use of com.google.gerrit.reviewdb.client.Project.NameKey in project gerrit by GerritCodeReview.

the class RepositoryConfigTest method ownerGroupsForSpecificFilter.

@Test
public void ownerGroupsForSpecificFilter() {
    ImmutableList<String> ownerGroups = ImmutableList.of("group1", "group2");
    configureOwnerGroups("someProject", ownerGroups);
    assertThat(repoCfg.getOwnerGroups(new NameKey("someOtherProject"))).isEmpty();
    assertThat(repoCfg.getOwnerGroups(new NameKey("someProject"))).containsExactlyElementsIn(ownerGroups);
}
Also used : NameKey(com.google.gerrit.reviewdb.client.Project.NameKey) Test(org.junit.Test)

Aggregations

NameKey (com.google.gerrit.reviewdb.client.Project.NameKey)7 Test (org.junit.Test)6 Change (com.google.gerrit.reviewdb.client.Change)1 Status (com.google.gerrit.reviewdb.client.Change.Status)1 ObjectId (org.eclipse.jgit.lib.ObjectId)1