mirror of
https://github.com/google/nomulus.git
synced 2025-06-01 02:04:04 +02: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:
parent
41622a4de0
commit
8c78719cfa
11 changed files with 40 additions and 34 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import com.google.re2j.Matcher;
|
||||
import com.google.re2j.Pattern;
|
||||
|
@ -34,7 +34,7 @@ public class GetSchemaTreeCommandTest extends CommandTestCase<GetSchemaTreeComma
|
|||
while (matcher.find()) {
|
||||
count++;
|
||||
}
|
||||
assertThat(count).named(printableName + " occurences").isEqualTo(1);
|
||||
assertWithMessage(printableName + " occurences").that(count).isEqualTo(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue