Polish
See gh-11811
This commit is contained in:
committed by
Stephane Nicoll
parent
5332bcbe28
commit
914bdb393f
@@ -76,14 +76,14 @@ public class EndpointServletTests {
|
||||
public void withInitParameterNullName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(null, "value"));
|
||||
endpointServlet.withInitParameter(null, "value");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParameterEmptyName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(" ", "value"));
|
||||
endpointServlet.withInitParameter(" ", "value");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,6 +102,20 @@ public class EndpointServletTests {
|
||||
entry("a", "b1"), entry("c", "d"), entry("e", "f"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParametersNullName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(null, "value"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParametersEmptyName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(" ", "value"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParametersShouldCreateNewInstance() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
|
||||
Reference in New Issue
Block a user