Rename WhoisServer and WhoisHttpServer to actions

These servlets are converted to actions during daggerization. Calling them servers are misleading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190942237
This commit is contained in:
jianglai 2018-03-29 09:40:44 -07:00
parent 038a2679c7
commit c40eda3235
21 changed files with 170 additions and 185 deletions

View file

@ -55,28 +55,28 @@ public final class WhoisInjectionTest {
}
@Test
public void testWhoisServer_injectsAndWorks() throws Exception {
public void testWhoisAction_injectsAndWorks() throws Exception {
createTld("lol");
persistResource(makeHostResource("ns1.cat.lol", "1.2.3.4"));
when(req.getReader()).thenReturn(new BufferedReader(new StringReader("ns1.cat.lol\r\n")));
DaggerWhoisTestComponent.builder()
.requestModule(new RequestModule(req, rsp))
.build()
.whoisServer()
.whoisAction()
.run();
verify(rsp).setStatus(200);
assertThat(httpOutput.toString()).contains("ns1.cat.lol");
}
@Test
public void testWhoisHttpServer_injectsAndWorks() throws Exception {
public void testWhoisHttpAction_injectsAndWorks() throws Exception {
createTld("lol");
persistResource(makeHostResource("ns1.cat.lol", "1.2.3.4"));
when(req.getRequestURI()).thenReturn("/whois/ns1.cat.lol");
DaggerWhoisTestComponent.builder()
.requestModule(new RequestModule(req, rsp))
.build()
.whoisHttpServer()
.whoisHttpAction()
.run();
verify(rsp).setStatus(200);
assertThat(httpOutput.toString()).contains("ns1.cat.lol");