Migrate from assertThat(foo).named("foo") to assertWithMessage("foo").that(foo).
(The exact change is slightly different in some cases, like when using custom subjects, but it's still a migration from named(...) to assertWithMessage(...).) Or, in one case, migrate from calling this.named(...) to overriding actualCustomStringRepresentation(). named(...) is being removed. This CL may modify the failure messages produced, but all the old information will still be present. Change-Id: I02219e5c502193e02e2c0abbf8eb9d73c406b0ee
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.testing;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import com.google.common.util.concurrent.ForwardingExecutorService;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
@@ -57,8 +57,8 @@ public class AssertableExecutorService extends ForwardingExecutorService {
|
||||
|
||||
/** Asserts and resets the number of executions this executor observed. */
|
||||
public void assertInteractions(int expectedNumInteractions) {
|
||||
assertThat(numInteractions.get())
|
||||
.named("expectedRunnablesSubmittedOnExecutor")
|
||||
assertWithMessage("expectedRunnablesSubmittedOnExecutor")
|
||||
.that(numInteractions.get())
|
||||
.isEqualTo(expectedNumInteractions);
|
||||
numInteractions.set(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user