Search in sources :

Example 1 with AssigneeInput

use of com.google.gerrit.extensions.api.changes.AssigneeInput in project gerrit by GerritCodeReview.

the class AssigneeIT method setAssignee.

private AccountInfo setAssignee(PushOneCommit.Result r, String identifieer) throws Exception {
    AssigneeInput input = new AssigneeInput();
    input.assignee = identifieer;
    return change(r).setAssignee(input);
}
Also used : AssigneeInput(com.google.gerrit.extensions.api.changes.AssigneeInput)

Example 2 with AssigneeInput

use of com.google.gerrit.extensions.api.changes.AssigneeInput in project gerrit by GerritCodeReview.

the class ChangeNotificationsIT method assign.

private void assign(StagedChange sc, TestAccount by, TestAccount to, EmailStrategy emailStrategy) throws Exception {
    setEmailStrategy(by, emailStrategy);
    requestScopeOperations.setApiUser(by.id());
    AssigneeInput in = new AssigneeInput();
    in.assignee = to.email();
    gApi.changes().id(sc.changeId).setAssignee(in);
}
Also used : AssigneeInput(com.google.gerrit.extensions.api.changes.AssigneeInput)

Example 3 with AssigneeInput

use of com.google.gerrit.extensions.api.changes.AssigneeInput in project gerrit by GerritCodeReview.

the class AbstractQueryChangesTest method assignee.

@Test
public void assignee() throws Exception {
    TestRepository<Repo> repo = createProject("repo");
    Change change1 = insert(repo, newChange(repo));
    Change change2 = insert(repo, newChange(repo));
    AssigneeInput input = new AssigneeInput();
    input.assignee = user.getUserName().get();
    gApi.changes().id(change1.getChangeId()).setAssignee(input);
    assertQuery("is:assigned", change1);
    assertQuery("-is:assigned", change2);
    assertQuery("is:unassigned", change2);
    assertQuery("-is:unassigned", change1);
    assertQuery("assignee:" + user.getUserName().get(), change1);
    assertQuery("-assignee:" + user.getUserName().get(), change2);
}
Also used : Repo(com.google.gerrit.testing.InMemoryRepositoryManager.Repo) AssigneeInput(com.google.gerrit.extensions.api.changes.AssigneeInput) Change(com.google.gerrit.entities.Change) Test(org.junit.Test)

Aggregations

AssigneeInput (com.google.gerrit.extensions.api.changes.AssigneeInput)3 Change (com.google.gerrit.entities.Change)1 Repo (com.google.gerrit.testing.InMemoryRepositoryManager.Repo)1 Test (org.junit.Test)1