Examples of MockServletContext


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

   *            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

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

   *            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

Examples of org.exoplatform.test.MockServletContext

         J2EEServerInfo senv = getServerEnvironment();
         if ("standalone".equals(senv.getServerName()) || "test".equals(senv.getServerName()))
         {
            try
            {
               MockServletContext scontext = new MockServletContext(name);
               pcontainer = new PortalContainer(this, scontext);
               final PortalContainer currentPortalContainer = pcontainer;
               SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
               {
                  public Void run()
View Full Code Here

Examples of org.exoplatform.test.mocks.servlet.MockServletContext

         J2EEServerInfo senv = getServerEnvironment();
         if ("standalone".equals(senv.getServerName()) || "test".equals(senv.getServerName()))
         {
            try
            {
               MockServletContext scontext = new MockServletContext(name);
               pcontainer = new PortalContainer(this, scontext);
               ConfigurationManagerImpl cService = new MockConfigurationManagerImpl(scontext);
               cService.addConfiguration(ContainerUtil.getConfigurationURL("conf/portal/configuration.xml"));
               cService.addConfiguration(ContainerUtil.getConfigurationURL("conf/portal/test-configuration.xml"));
               cService.processRemoveConfiguration();
View Full Code Here

Examples of org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockServletContext

               HttpSessionManager sessionManager = Utils.getBeanReference(manager, HttpSessionManager.class);

               HttpSession session = sessionStore.get(id.getId());
               if(session == null)
               {
                  session = new MockHttpSession(id.getId(), new MockServletContext("/"));
               }
               sessionManager.setSession(session);
               sessionStore.put(id.getId(), session);
            }
         }
View Full Code Here

Examples of org.jboss.seam.mock.MockServletContext

   @Test
   public void testConstraints() throws Exception
   {
      // Initialize Seam
      MockServletContext servletContext = new MockServletContext();
      ServletLifecycle.beginApplication(servletContext);
      new Initialization(servletContext).create().init();

      try
      {
View Full Code Here

Examples of org.jboss.seam.mock.MockServletContext

   */
  @BeforeSuite
  public void triggerComponentScan()
  {
      Lifecycle.beginApplication(new HashMap<String, Object>());
      new Initialization(new MockServletContext()).create().init();
      Lifecycle.endApplication();
  }
View Full Code Here

Examples of org.jboss.seam.mock.MockServletContext

   }
  
   @Test
   public void testCyclicDependencyThowsException() throws Exception
   {
      MockServletContext servletContext = new MockServletContext();
      ServletLifecycle.beginApplication(servletContext);
      MockExternalContext externalContext = new MockExternalContext(servletContext);
      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
      appContext.set( Seam.getComponentName(Init.class), new Init() );
      appContext.set(
View Full Code Here

Examples of org.jboss.seam.mock.MockServletContext

   }

   @Test
   public void testConversationInterceptor() throws Exception
   {
      MockServletContext servletContext = new MockServletContext();
      ServletLifecycle.beginApplication(servletContext);
      MockExternalContext externalContext = new MockExternalContext(servletContext);
      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
      appContext.set( Seam.getComponentName(Init.class), new Init() );
      appContext.set(
View Full Code Here

Examples of org.jboss.seam.mock.MockServletContext

   }
  
   @Test
   public void testConversationalInterceptor() throws Exception
   {
      MockServletContext servletContext = new MockServletContext();
      ServletLifecycle.beginApplication(servletContext);
      MockExternalContext externalContext = new MockExternalContext(servletContext);
      Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
      appContext.set( Seam.getComponentName(Init.class), new Init() );
      appContext.set(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.