cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1235426 - /cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Date Tue, 24 Jan 2012 19:19:42 GMT
Author: dkulp
Date: Tue Jan 24 19:19:41 2012
New Revision: 1235426

URL: http://svn.apache.org/viewvc?rev=1235426&view=rev
Log:
Fix mocks

Modified:
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=1235426&r1=1235425&r2=1235426&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Tue Jan 24 19:19:41 2012
@@ -676,6 +676,8 @@ public class JettyHTTPDestinationTest ex
         EasyMock.expectLastCall().andReturn(method).atLeastOnce();
         request.getConnection();
         EasyMock.expectLastCall().andReturn(null).anyTimes();
+        request.getUserPrincipal();
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
         
         if (setRedirectURL) {
             policy.setRedirectURL(NOWHERE + "foo/bar");
@@ -753,16 +755,20 @@ public class JettyHTTPDestinationTest ex
         }
         
         if (decoupled) {
-            decoupledBackChannel = EasyMock.createMock(Conduit.class);
-            decoupledBackChannel.setMessageObserver(EasyMock.isA(MessageObserver.class));
          
-            decoupledBackChannel.prepare(EasyMock.isA(Message.class));
-            EasyMock.expectLastCall();
-            EasyMock.replay(decoupledBackChannel);
+            setupDecoupledBackChannel();
         }
         EasyMock.replay(response);
         EasyMock.replay(request);
     }
     
+    private void setupDecoupledBackChannel() throws IOException {
+        decoupledBackChannel = EasyMock.createMock(Conduit.class);
+        decoupledBackChannel.setMessageObserver(EasyMock.isA(MessageObserver.class));   
       
+        decoupledBackChannel.prepare(EasyMock.isA(Message.class));
+        EasyMock.expectLastCall();
+        EasyMock.replay(decoupledBackChannel);
+    }
+    
     private void setUpInMessage() {
         inMessage.setExchange(new ExchangeImpl());
     }



Mime
View raw message