Search in sources :

Example 26 with GroupInput

use of com.google.gerrit.extensions.api.groups.GroupInput in project gerrit by GerritCodeReview.

the class AbstractQueryGroupsTest method createGroupWithOwner.

protected GroupInfo createGroupWithOwner(String name, GroupInfo ownerGroup) throws Exception {
    GroupInput in = new GroupInput();
    in.name = name;
    in.ownerId = ownerGroup.id;
    return gApi.groups().create(in).get();
}
Also used : GroupInput(com.google.gerrit.extensions.api.groups.GroupInput)

Example 27 with GroupInput

use of com.google.gerrit.extensions.api.groups.GroupInput in project gerrit by GerritCodeReview.

the class AbstractQueryGroupsTest method createGroupThatIsVisibleToAll.

protected GroupInfo createGroupThatIsVisibleToAll(String name) throws Exception {
    GroupInput in = new GroupInput();
    in.name = name;
    in.visibleToAll = true;
    return gApi.groups().create(in).get();
}
Also used : GroupInput(com.google.gerrit.extensions.api.groups.GroupInput)

Aggregations

GroupInput (com.google.gerrit.extensions.api.groups.GroupInput)27 AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)13 Test (org.junit.Test)13 GroupInfo (com.google.gerrit.extensions.common.GroupInfo)9 GroupAssert.assertGroupInfo (com.google.gerrit.acceptance.api.group.GroupAssert.assertGroupInfo)6 PushOneCommit (com.google.gerrit.acceptance.PushOneCommit)5 TestAccount (com.google.gerrit.acceptance.TestAccount)5 AccountGroup (com.google.gerrit.entities.AccountGroup)5 BadRequestException (com.google.gerrit.extensions.restapi.BadRequestException)4 ResourceConflictException (com.google.gerrit.extensions.restapi.ResourceConflictException)4 Account (com.google.gerrit.entities.Account)3 ImmutableList (com.google.common.collect.ImmutableList)2 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 Iterables (com.google.common.collect.Iterables)2 Truth.assertThat (com.google.common.truth.Truth.assertThat)2 ExtensionRegistry (com.google.gerrit.acceptance.ExtensionRegistry)2 Registration (com.google.gerrit.acceptance.ExtensionRegistry.Registration)2 NoHttpd (com.google.gerrit.acceptance.NoHttpd)2 ProjectOperations (com.google.gerrit.acceptance.testsuite.project.ProjectOperations)2