Package org.apache.wicket.protocol.http.mock

Examples of org.apache.wicket.protocol.http.mock.MockServletContext


    }

    @Override
    public ServletContext getServletContext()
    {
      return new MockServletContext(null, null);
    }
View Full Code Here


   *            the absolute path on disk to the web application's contents (e.g. war root) - may
   *            be <code>null</code>
   */
  public BaseWicketTester(final WebApplication application, String servletContextBasePath)
  {
    this(application, new MockServletContext(application, servletContextBasePath));
  }
View Full Code Here

   *            the servlet context used as backend
   */
  public BaseWicketTester(final WebApplication application, final ServletContext servletCtx)
  {
    servletContext = servletCtx != null ? servletCtx
      : new MockServletContext(application, null);

    final FilterConfig filterConfig = new TestFilterConfig();
    WicketFilter filter = new WicketFilter()
    {
      @Override
View Full Code Here

    }

    @Override
    public ServletContext getServletContext()
    {
      return new MockServletContext(null, null);
    }
View Full Code Here

  @Test
  public void testLocalizer()
  {
    MockApplication dummy = new MockApplication();
    dummy.setName("test-app");
    dummy.setServletContext(new MockServletContext(dummy, ""));
    ThreadContext.setApplication(dummy);
    dummy.initApplication();
    Localizer localizer = dummy.getResourceSettings().getLocalizer();
    Assert.assertNotNull("Localizer should be available", localizer);
    dummy.internalDestroy();
View Full Code Here

   *            the absolute path on disk to the web application's contents (e.g. war root) - may
   *            be <code>null</code>
   */
  public BaseWicketTester(final WebApplication application, String servletContextBasePath)
  {
    this(application, new MockServletContext(application, servletContextBasePath));
  }
View Full Code Here

   *            the servlet context used as backend
   */
  public BaseWicketTester(final WebApplication application, final ServletContext servletCtx)
  {
    servletContext = servletCtx != null ? servletCtx
      : new MockServletContext(application, null);

    final FilterConfig filterConfig = new TestFilterConfig();
    WicketFilter filter = new WicketFilter()
    {
      @Override
View Full Code Here

   *            the absolute path on disk to the web application's contents (e.g. war root) - may
   *            be <code>null</code>
   */
  public BaseWicketTester(final WebApplication application, String servletContextBasePath)
  {
    this(application, new MockServletContext(application, servletContextBasePath));
  }
View Full Code Here

   *            the servlet context used as backend
   */
  public BaseWicketTester(final WebApplication application, final ServletContext servletCtx)
  {
    servletContext = servletCtx != null ? servletCtx
      : new MockServletContext(application, null);

    final FilterConfig filterConfig = new TestFilterConfig();
    WicketFilter filter = new WicketFilter()
    {
      @Override
View Full Code Here

   */
  @Test
  public void testInjectionAndSerialization()
  {
    MockApplication app = new MockApplication();
    app.setServletContext(new MockServletContext(app, null));
    try
    {
      ThreadContext.setApplication(app);

      app.setName(getClass().getName());
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.mock.MockServletContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.