Switch to constructor injection in a few actions

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=232552406
This commit is contained in:
mcilwain 2019-02-05 13:57:17 -08:00 committed by jianglai
parent 927e8bbd73
commit 29d3ad8052
5 changed files with 49 additions and 50 deletions

View file

@ -41,20 +41,14 @@ import org.junit.runners.JUnit4;
public class RefreshDnsActionTest {
@Rule
public final AppEngineRule appEngine = AppEngineRule.builder()
.withDatastore()
.withTaskQueue()
.build();
public final AppEngineRule appEngine =
AppEngineRule.builder().withDatastore().withTaskQueue().build();
private final DnsQueue dnsQueue = mock(DnsQueue.class);
private final FakeClock clock = new FakeClock();
private void run(TargetType type, String name) {
RefreshDnsAction action = new RefreshDnsAction();
action.clock = clock;
action.domainOrHostName = name;
action.type = type;
action.dnsQueue = dnsQueue;
action.run();
new RefreshDnsAction(name, type, clock, dnsQueue).run();
}
@Before