Search in sources :

Example 11 with Comment

use of com.google.gerrit.entities.Comment in project gerrit by GerritCodeReview.

the class CommentThreadTest method threadCanBeResolved.

@Test
public void threadCanBeResolved() {
    HumanComment root = resolved(createComment("root"));
    CommentThread<Comment> commentThread = CommentThread.builder().addComment(root).build();
    assertThat(commentThread.unresolved()).isFalse();
}
Also used : Comment(com.google.gerrit.entities.Comment) HumanComment(com.google.gerrit.entities.HumanComment) HumanComment(com.google.gerrit.entities.HumanComment) Test(org.junit.Test)

Example 12 with Comment

use of com.google.gerrit.entities.Comment in project gerrit by GerritCodeReview.

the class CommentThreadTest method lastCommentInThreadDeterminesUnresolvedStatus.

@Test
public void lastCommentInThreadDeterminesUnresolvedStatus() {
    HumanComment root = resolved(createComment("root"));
    HumanComment child = unresolved(createComment("child"));
    CommentThread<Comment> commentThread = CommentThread.builder().addComment(root).addComment(child).build();
    assertThat(commentThread.unresolved()).isTrue();
}
Also used : Comment(com.google.gerrit.entities.Comment) HumanComment(com.google.gerrit.entities.HumanComment) HumanComment(com.google.gerrit.entities.HumanComment) Test(org.junit.Test)

Aggregations

Comment (com.google.gerrit.entities.Comment)12 HumanComment (com.google.gerrit.entities.HumanComment)9 RobotComment (com.google.gerrit.entities.RobotComment)5 Test (org.junit.Test)4 Map (java.util.Map)3 FluentLogger (com.google.common.flogger.FluentLogger)2 Project (com.google.gerrit.entities.Project)2 Inject (com.google.inject.Inject)2 Assisted (com.google.inject.assistedinject.Assisted)2 IOException (java.io.IOException)2 List (java.util.List)2 Optional (java.util.Optional)2 Repository (org.eclipse.jgit.lib.Repository)2 AutoValue (com.google.auto.value.AutoValue)1 Strings (com.google.common.base.Strings)1 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 ImmutableSet.toImmutableSet (com.google.common.collect.ImmutableSet.toImmutableSet)1 Iterables (com.google.common.collect.Iterables)1