Skip to content

Commit

Permalink
Temporarily qualify calls to custom assertThat(Optional) methods
Browse files Browse the repository at this point in the history
The Truth team is working on migrating callers of the Truth8.assertThat
methods to call equivalent methods on the main Truth class.

Due to this calls to custom assertThat(Optional) methods will
temporarily become ambiguous and hence need to be qualified to avoid
breakage.

Release-Notes: skip
Change-Id: Ib68aa7737300dbeb39e4e877051682a82ea7496b
Signed-off-by: Edwin Kempin <ekempin@google.com>
  • Loading branch information
EdwinKempin committed Jan 16, 2024
1 parent a2c4f26 commit 177450d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static com.google.gerrit.extensions.restapi.testing.BinaryResultSubject.assertThat;
import static com.google.gerrit.testing.GerritJUnit.assertThrows;
import static com.google.gerrit.truth.MapSubject.assertThatMap;
import static com.google.gerrit.truth.OptionalSubject.assertThat;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand All @@ -49,6 +48,7 @@
import com.google.gerrit.extensions.restapi.BinaryResult;
import com.google.gerrit.extensions.restapi.RestApiException;
import com.google.gerrit.truth.NullAwareCorrespondence;
import com.google.gerrit.truth.OptionalSubject;
import com.google.inject.Inject;
import java.util.Map;
import org.eclipse.jgit.lib.ObjectId;
Expand Down Expand Up @@ -1629,7 +1629,7 @@ public void parentUuidOfPublishedCommentCanBeRetrieved() {

TestHumanComment comment = changeOperations.change(changeId).comment(childCommentUuid).get();

assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
OptionalSubject.assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
}

@Test
Expand All @@ -1640,7 +1640,7 @@ public void tagOfPublishedCommentCanBeRetrieved() {

TestHumanComment comment = changeOperations.change(changeId).comment(childCommentUuid).get();

assertThat(comment.tag()).value().isEqualTo("tag");
OptionalSubject.assertThat(comment.tag()).value().isEqualTo("tag");
}

@Test
Expand Down Expand Up @@ -1700,7 +1700,7 @@ public void parentUuidOfDraftCommentCanBeRetrieved() {
TestHumanComment comment =
changeOperations.change(changeId).draftComment(childCommentUuid).get();

assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
OptionalSubject.assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
}

@Test
Expand Down Expand Up @@ -1730,7 +1730,7 @@ public void parentUuidOfRobotCommentCanBeRetrieved() {
TestRobotComment comment =
changeOperations.change(changeId).robotComment(childCommentUuid).get();

assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
OptionalSubject.assertThat(comment.parentUuid()).value().isEqualTo(parentCommentUuid);
}

private ChangeInfo getChangeFromServer(Change.Id changeId) throws RestApiException {
Expand Down

0 comments on commit 177450d

Please # to comment.