mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Remove unused request parameter extractor
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130672143
This commit is contained in:
parent
f10a7d8fb0
commit
5ff8b9377c
2 changed files with 0 additions and 34 deletions
|
@ -20,7 +20,6 @@ import static google.registry.request.RequestParameters.extractEnumParameter;
|
|||
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
|
||||
import static google.registry.request.RequestParameters.extractOptionalParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredDatetimeParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredMaybeEmptyParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
@ -64,26 +63,6 @@ public class RequestParametersTest {
|
|||
extractRequiredParameter(req, "spin");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractRequiredMaybeEmptyParameter_valuePresent_returnsValue() throws Exception {
|
||||
when(req.getParameter("spin")).thenReturn("bog");
|
||||
assertThat(extractRequiredMaybeEmptyParameter(req, "spin")).isEqualTo("bog");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractRequiredMaybeEmptyParameter_notPresent_throwsBadRequest()
|
||||
throws Exception {
|
||||
thrown.expect(BadRequestException.class, "spin");
|
||||
extractRequiredMaybeEmptyParameter(req, "spin");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractRequiredMaybeEmptyParameter_empty_returnsValue()
|
||||
throws Exception {
|
||||
when(req.getParameter("spin")).thenReturn("");
|
||||
assertThat(extractRequiredMaybeEmptyParameter(req, "spin")).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractOptionalParameter_valuePresent_returnsValue() throws Exception {
|
||||
when(req.getParameter("spin")).thenReturn("bog");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue