Migrate final try/catch test assertions to use assert/expectThrows

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182091814
This commit is contained in:
mcilwain 2018-01-16 12:08:08 -08:00 committed by Ben McIlwain
parent fe7cc4f782
commit c416b3892d
17 changed files with 124 additions and 172 deletions

View file

@ -41,6 +41,11 @@ public class EppExceptionSubject extends Subject<EppExceptionSubject, EppExcepti
return new And<>(this);
}
public And<EppExceptionSubject> hasMessageThatContains(String expected) {
assertThat(actual()).hasMessageThat().contains(expected);
return new And<>(this);
}
public And<EppExceptionSubject> marshalsToXml() {
// Attempt to marshal the exception to EPP. If it doesn't work, this will throw.
try {