mirror of
https://github.com/google/nomulus
synced 2026-08-21 22:56:19 +00:00
Normalize expected exception handling in tests
This removes exception rules that aren't used and switches over existing uses of ExceptedException to ExceptionRule when possible. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129013329
This commit is contained in:
committed by
Justine Tunney
parent
60fc27646a
commit
9e65acc937
@@ -17,9 +17,9 @@ package google.registry.ui.forms;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.common.testing.NullPointerTester;
|
||||
import google.registry.testing.ExceptionRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.junit.runners.JUnit4;
|
||||
public class FormFieldExceptionTest {
|
||||
|
||||
@Rule
|
||||
public final ExpectedException thrown = ExpectedException.none();
|
||||
public ExceptionRule thrown = new ExceptionRule();
|
||||
|
||||
@Test
|
||||
public void testGetFieldName_multiplePropagations_joinsUsingJsonNotation() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user