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:
Ben McIlwain 2016-08-01 12:25:54 -07:00 committed by Justine Tunney
parent 60fc27646a
commit 9e65acc937
11 changed files with 14 additions and 29 deletions

View file

@ -34,7 +34,6 @@ import org.joda.time.Duration;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
@ -51,9 +50,6 @@ public class PublishDnsUpdatesActionTest {
@Rule
public final InjectRule inject = new InjectRule();
@Rule
public final ExpectedException thrown = ExpectedException.none();
private final FakeClock clock = new FakeClock(DateTime.parse("1971-01-01TZ"));
private final DnsWriter dnsWriter = mock(DnsWriter.class);
private PublishDnsUpdatesAction action;