Refactor WhoisReader.readCommand() method to take a now param

This obviates the need for the use of @AutoFactory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149570411
This commit is contained in:
mcilwain 2017-03-08 12:40:14 -08:00 committed by Ben McIlwain
parent 9eddbe2b6e
commit 815dae2749
8 changed files with 23 additions and 49 deletions

View file

@ -45,8 +45,8 @@ public class WhoisReaderTest {
@SuppressWarnings("unchecked") // XXX: Generic abuse ftw.
<T> T readCommand(String commandStr) throws Exception {
return (T)
new WhoisReader(new WhoisCommandFactory(), clock.nowUtc())
.readCommand(new StringReader(commandStr));
new WhoisReader(new WhoisCommandFactory())
.readCommand(new StringReader(commandStr), clock.nowUtc());
}
void assertLoadsExampleTld(String commandString) throws Exception {