mirror of
https://github.com/google/nomulus.git
synced 2025-07-26 04:28:34 +02:00
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:
parent
038a2679c7
commit
c40eda3235
21 changed files with 170 additions and 185 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue