[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/web ...

Tom Elrod tom.elrod at jboss.com
Sat Jul 15 00:40:13 EDT 2006


  User: telrod  
  Date: 06/07/15 00:40:13

  Modified:    src/tests/org/jboss/test/remoting/transport/web 
                        WebInvokerTestClient.java
  Log:
  JBREM-543 & JBREM-542 & JBREM-539 - fixed servlet invoker and added sslservlet invoker.
  
  Revision  Changes    Path
  1.10      +17 -11    JBossRemoting/src/tests/org/jboss/test/remoting/transport/web/WebInvokerTestClient.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WebInvokerTestClient.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/web/WebInvokerTestClient.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- WebInvokerTestClient.java	21 May 2006 04:47:34 -0000	1.9
  +++ WebInvokerTestClient.java	15 Jul 2006 04:40:13 -0000	1.10
  @@ -92,17 +92,7 @@
            boolean correctUserAgent = ((String)response).startsWith(remotingUserAgentValue);
            assertTrue("User-Agent should be begin with " + remotingUserAgentValue + " but was " + response, correctUserAgent);
   
  -         response = remotingClient.invoke(WebInvocationHandler.THROW_EXCEPTION_PARAM, metadata);
  -         if(response instanceof Exception)
  -         {
  -            System.out.println("Return from invocation is of type Exception as expected.");
  -            assertTrue("Received exception return as expected.", true);
  -         }
  -         else
  -         {
  -            System.out.println("Did not get Exception type returned as expected.");
  -            assertTrue("Should have received Exception as return.", false);
  -         }
  +         makeExceptionInvocation(remotingClient, metadata);
   
            remotingClient.invokeOneway("Do something", metadata, true);
   
  @@ -123,6 +113,22 @@
   
      }
   
  +   protected void makeExceptionInvocation(Client remotingClient, Map metadata)
  +         throws Throwable
  +   {
  +      Object response = remotingClient.invoke(WebInvocationHandler.THROW_EXCEPTION_PARAM, metadata);
  +      if(response instanceof Exception)
  +      {
  +         System.out.println("Return from invocation is of type Exception as expected.");
  +         assertTrue("Received exception return as expected.", true);
  +      }
  +      else
  +      {
  +         System.out.println("Did not get Exception type returned as expected.");
  +         assertTrue("Should have received Exception as return.", false);
  +      }
  +   }
  +
      public void testGetInvocation() throws Exception
      {
         Client remotingClient = null;
  
  
  



More information about the jboss-cvs-commits mailing list