Skip to content

Commit 1956bed

Browse files
[BAEL-9099] Different Ways to Get Servlet Context
- fix test class and method names
1 parent bb361c0 commit 1956bed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web-modules/jakarta-servlets-2/src/test/java/com/baeldung/context/ContextServletTest.java renamed to web-modules/jakarta-servlets-2/src/test/java/com/baeldung/context/ContextServletUnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import static org.junit.jupiter.api.Assertions.*;
1414

15-
class ContextServletTest extends BaseServletTest {
15+
class ContextServletUnitTest extends BaseServletTest {
1616

1717
private static final List<String> CONTEXT_LABELS = List.of(ContextServlet.LABEL_FROM_HTTP_SERVLET, ContextServlet.LABEL_FROM_SERVLET_CONFIG,
1818
ContextServlet.LABEL_FROM_HTTP_SERVLET_REQUEST, ContextServlet.LABEL_FROM_HTTP_SESSION);
@@ -23,7 +23,7 @@ protected void configure(ServletContextHandler ctx) {
2323
}
2424

2525
@Test
26-
void contextServlet_returnsAllSources_andSameInstance() throws Exception {
26+
void givenContextServlet_whenGetRequest_thenResponseContainsSameContextInstance() throws Exception {
2727
ContentResponse response = httpClient.GET(URI.create(baseUri() + ContextServlet.PATH));
2828

2929
assertEquals(HttpStatus.SC_OK, response.getStatus());

0 commit comments

Comments
 (0)