mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +02:00
Migrate TestVerb.withFailureMessage to use withMessage instead
Also updates Truth version to 0.34 where the replacement method was added. More information: [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161970305
This commit is contained in:
parent
bfde7dac0b
commit
5966d8077b
2 changed files with 5 additions and 5 deletions
|
@ -1131,10 +1131,10 @@ def com_google_re2j():
|
||||||
def com_google_truth():
|
def com_google_truth():
|
||||||
java_import_external(
|
java_import_external(
|
||||||
name = "com_google_truth",
|
name = "com_google_truth",
|
||||||
jar_sha256 = "032eddc69652b0a1f8d458f999b4a9534965c646b8b5de0eba48ee69407051df",
|
jar_sha256 = "772bfaccd05b9203f929536def0b4157094130629bc105d555bef8eacc3c1675",
|
||||||
jar_urls = [
|
jar_urls = [
|
||||||
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
|
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.34/truth-0.34.jar",
|
||||||
"http://repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
|
"http://repo1.maven.org/maven2/com/google/truth/truth/0.34/truth-0.34.jar",
|
||||||
],
|
],
|
||||||
licenses = ["notice"], # The Apache Software License, Version 2.0
|
licenses = ["notice"], # The Apache Software License, Version 2.0
|
||||||
testonly_ = True,
|
testonly_ = True,
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class LogsSubject extends Subject<LogsSubject, TestLogHandler> {
|
||||||
|
|
||||||
public void hasNoLogsAtLevel(Level level) {
|
public void hasNoLogsAtLevel(Level level) {
|
||||||
check()
|
check()
|
||||||
.withFailureMessage("Logs at level %s", level)
|
.withMessage("Logs at level %s", level)
|
||||||
.that(getMessagesAtLevel(level))
|
.that(getMessagesAtLevel(level))
|
||||||
.isEmpty();
|
.isEmpty();
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public class LogsSubject extends Subject<LogsSubject, TestLogHandler> {
|
||||||
public Which<StringSubject> hasLogAtLevelWithMessage(Level level, String message) {
|
public Which<StringSubject> hasLogAtLevelWithMessage(Level level, String message) {
|
||||||
List<String> messagesAtLevel = getMessagesAtLevel(level);
|
List<String> messagesAtLevel = getMessagesAtLevel(level);
|
||||||
check()
|
check()
|
||||||
.withFailureMessage("Logs at level %s", level)
|
.withMessage("Logs at level %s", level)
|
||||||
.that(messagesAtLevel)
|
.that(messagesAtLevel)
|
||||||
.comparingElementsUsing(CONTAINS_CORRESPONDENCE)
|
.comparingElementsUsing(CONTAINS_CORRESPONDENCE)
|
||||||
.contains(message);
|
.contains(message);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue