Examples of MockValve


Examples of org.jboss.test.cluster.web.mocks.MockValve

      MockJBossManager mgr = new MockJBossManager();
      mgr.setJvmRoute(JVM_ROUTE);
      
      JvmRouteValve jvmRouteValve = new JvmRouteValve(mgr);
     
      MockValve mockValve = new MockValve();
     
      jvmRouteValve.setNext(mockValve);
     
      MockRequest req = new MockRequest();
     
      Response res = new Response();
     
      jvmRouteValve.invoke(req, res);
     
      assertSame(req, mockValve.getInvokedRequest());
      assertSame(res, mockValve.getInvokedResponse());
      assertEquals(null, mgr.findSession(NON_FAILOVER_ID));
      assertEquals(null, mgr.findSession(FAILOVER_ID));
      assertEquals(null, mgr.getNewCookieIdSession());         
   }
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.