mirror of
https://github.com/google/nomulus
synced 2026-09-19 06:32:00 +00:00
Manually migrate some ExceptionRules to Junit 4.13 style asserts
These testing helper functions can't be handled by the automatic refactoring tool because they're taking in expected exception details as parameters. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=178832406
This commit is contained in:
@@ -617,13 +617,16 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
|
||||
private void runFailureReservedListsTest(
|
||||
String reservedLists, Class<? extends Exception> errorClass, String errorMsg)
|
||||
throws Exception {
|
||||
thrown.expect(errorClass);
|
||||
thrown.expectMessage(errorMsg);
|
||||
runCommandForced(
|
||||
"--reserved_lists",
|
||||
reservedLists,
|
||||
"--roid_suffix=Q9JYB4C",
|
||||
"--dns_writers=VoidDnsWriter",
|
||||
"xn--q9jyb4c");
|
||||
Exception e =
|
||||
expectThrows(
|
||||
errorClass,
|
||||
() ->
|
||||
runCommandForced(
|
||||
"--reserved_lists",
|
||||
reservedLists,
|
||||
"--roid_suffix=Q9JYB4C",
|
||||
"--dns_writers=VoidDnsWriter",
|
||||
"xn--q9jyb4c"));
|
||||
assertThat(e).hasMessageThat().isEqualTo(errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user