mirror of
https://github.com/google/nomulus
synced 2026-07-30 12:02:50 +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:
@@ -136,8 +136,8 @@ public class PosixTarHeaderSystemTest {
|
||||
|
||||
for (String name : files.keySet()) {
|
||||
File file = new File(folder.getRoot(), name);
|
||||
assertThat(file.exists()).named(name + " exists").isTrue();
|
||||
assertThat(file.isFile()).named(name + " is a file").isTrue();
|
||||
assertWithMessage(name + " exists").that(file.exists()).isTrue();
|
||||
assertWithMessage(name + " is a file").that(file.isFile()).isTrue();
|
||||
byte[] data = files.get(name).getBytes(UTF_8);
|
||||
assertThat(Files.asByteSource(file).read()).isEqualTo(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user