Package com.helger.web.scope.mock
Class AbstractWebScopeAwareTestCase
- java.lang.Object
-
- com.helger.web.scope.mock.AbstractWebScopeAwareTestCase
-
public abstract class AbstractWebScopeAwareTestCase extends Object
Base class for JUnit tests where the initialization of the scopes happens before each test execution.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description WebScopeTestRulem_aWebScopeJUnit test ruleprotected static StringMOCK_CONTEXT
-
Constructor Summary
Constructors Constructor Description AbstractWebScopeAwareTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.helger.servlet.mock.MockHttpServletRequestgetRequest()protected com.helger.servlet.mock.MockServletContextgetServletContext()protected com.helger.servlet.mock.MockServletPoolgetServletPool()protected jakarta.servlet.http.HttpSessiongetSession(boolean bCreateIfNotExisting)
-
-
-
Field Detail
-
MOCK_CONTEXT
protected static final String MOCK_CONTEXT
- See Also:
- Constant Field Values
-
m_aWebScope
public final WebScopeTestRule m_aWebScope
JUnit test rule
-
-
Method Detail
-
getServletContext
@Nonnull protected final com.helger.servlet.mock.MockServletContext getServletContext()
-
getServletPool
@Nonnull protected final com.helger.servlet.mock.MockServletPool getServletPool()
-
getRequest
@Nullable protected final com.helger.servlet.mock.MockHttpServletRequest getRequest()
-
getSession
@Nullable protected final jakarta.servlet.http.HttpSession getSession(boolean bCreateIfNotExisting)
-
-