Polish contribution
Closes gh-11809
This commit is contained in:
@@ -38,6 +38,7 @@ import static org.assertj.core.api.Assertions.entry;
|
||||
* Tests for {@link EndpointServlet}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
public class EndpointServletTests {
|
||||
|
||||
@@ -71,6 +72,20 @@ public class EndpointServletTests {
|
||||
assertThat(endpointServlet.getServlet()).isEqualTo(servlet);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParameterNullName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(null, "value"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParameterEmptyName() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
endpointServlet.withInitParameters(Collections.singletonMap(" ", "value"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withInitParameterShouldReturnNewInstance() {
|
||||
EndpointServlet endpointServlet = new EndpointServlet(TestServlet.class);
|
||||
|
||||
Reference in New Issue
Block a user