use of com.google.gerrit.extensions.common.GroupInfo in project gerrit by GerritCodeReview.
the class GroupOperationsImplTest method specifiedOwnerIsRespectedForGroupCreation.
@Test
public void specifiedOwnerIsRespectedForGroupCreation() throws Exception {
AccountGroup.UUID ownerGroupUuid = groupOperations.newGroup().create();
AccountGroup.UUID groupUuid = groupOperations.newGroup().ownerGroupUuid(ownerGroupUuid).create();
GroupInfo foundGroup = getGroupFromServer(groupUuid);
assertThat(foundGroup.ownerId).isEqualTo(ownerGroupUuid.get());
}
use of com.google.gerrit.extensions.common.GroupInfo in project gerrit by GerritCodeReview.
the class GroupOperationsImplTest method requestingNoMembersIsPossibleForGroupCreation.
@Test
public void requestingNoMembersIsPossibleForGroupCreation() throws Exception {
AccountGroup.UUID groupUuid = groupOperations.newGroup().clearMembers().create();
GroupInfo foundGroup = getGroupFromServer(groupUuid);
assertThat(foundGroup.members).isEmpty();
}
use of com.google.gerrit.extensions.common.GroupInfo in project gerrit by GerritCodeReview.
the class GroupOperationsImplTest method directlyAddingSubgroupsIsPossibleForGroupCreation.
@Test
public void directlyAddingSubgroupsIsPossibleForGroupCreation() throws Exception {
AccountGroup.UUID group1Uuid = groupOperations.newGroup().create();
AccountGroup.UUID group2Uuid = groupOperations.newGroup().create();
AccountGroup.UUID groupUuid = groupOperations.newGroup().addSubgroup(group1Uuid).addSubgroup(group2Uuid).create();
GroupInfo foundGroup = getGroupFromServer(groupUuid);
assertThat(foundGroup.includes).comparingElementsUsing(getGroupToUuidCorrespondence()).containsExactly(group1Uuid, group2Uuid);
}
use of com.google.gerrit.extensions.common.GroupInfo in project gerrit by GerritCodeReview.
the class GroupOperationsImplTest method groupCanBeCreatedWithoutSpecifyingAnyParameters.
@Test
public void groupCanBeCreatedWithoutSpecifyingAnyParameters() throws Exception {
AccountGroup.UUID groupUuid = groupOperations.newGroup().create();
GroupInfo foundGroup = getGroupFromServer(groupUuid);
assertThat(foundGroup.id).isEqualTo(groupUuid.get());
assertThat(foundGroup.name).isNotEmpty();
}
use of com.google.gerrit.extensions.common.GroupInfo in project gerrit by GerritCodeReview.
the class GroupOperationsImplTest method requestingNoDescriptionIsPossibleForGroupCreation.
@Test
public void requestingNoDescriptionIsPossibleForGroupCreation() throws Exception {
AccountGroup.UUID groupUuid = groupOperations.newGroup().clearDescription().create();
GroupInfo group = getGroupFromServer(groupUuid);
assertThat(group.description).isNull();
}
Aggregations