mirror of
https://github.com/google/nomulus
synced 2026-02-11 23:31:37 +00:00
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 or check(), but it's always a migration from named(...) to [assert]WithMessage(...).)
named(...) is being removed.
This CL may slightly modify the failure messages produced, but all the old information will still be present.
More information:
[]
Tested:
TAP --sample for global presubmit queue
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245762634
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import google.registry.testing.SystemPropertyRule;
|
||||
@@ -42,8 +43,8 @@ public class GtechToolTest {
|
||||
|
||||
@Test
|
||||
public void test_commandSet_namesAreSubsetOfRegistryToolCommands() {
|
||||
assertThat(Sets.difference(GtechTool.COMMAND_SET, RegistryTool.COMMAND_MAP.keySet()))
|
||||
.named("commands in GtechTool.COMMAND_SET but not in RegistryTool.COMMAND_MAP")
|
||||
assertWithMessage("commands in GtechTool.COMMAND_SET but not in RegistryTool.COMMAND_MAP")
|
||||
.that(Sets.difference(GtechTool.COMMAND_SET, RegistryTool.COMMAND_MAP.keySet()))
|
||||
.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user