You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2006/10/19 20:01:51 UTC
svn commit: r465704 -
/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
Author: dkulp
Date: Thu Oct 19 11:01:49 2006
New Revision: 465704
URL: http://svn.apache.org/viewvc?view=rev&rev=465704
Log:
Fix cr/lf problem
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java (contents, props changed)
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java?view=diff&rev=465704&r1=465703&r2=465704
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java Thu Oct 19 11:01:49 2006
@@ -1,123 +1,123 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.jaxws.handler.soap;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Binding;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-import junit.framework.TestCase;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.jaxws.handler.HandlerChainInvoker;
-import org.apache.cxf.message.Exchange;
-
-import org.easymock.classextension.IMocksControl;
-
-import static org.easymock.EasyMock.expect;
-import static org.easymock.classextension.EasyMock.createNiceControl;
-
-public class SOAPHandlerInterceptorTest extends TestCase {
-
- public void setUp() {
- }
-
- public void tearDown() {
- }
-
- public void testInterceptSuccess() {
- List<Handler> list = new ArrayList<Handler>();
- list.add(new SOAPHandler<SOAPMessageContext>() {
- public boolean handleMessage(SOAPMessageContext smc) {
- return true;
- }
-
- public boolean handleFault(SOAPMessageContext smc) {
- return true;
- }
-
- public Set<QName> getHeaders() {
- return null;
- }
-
- public void close(MessageContext messageContext) {
- }
- });
- HandlerChainInvoker invoker = new HandlerChainInvoker(list);
-
- IMocksControl control = createNiceControl();
- Binding binding = control.createMock(Binding.class);
- SoapMessage message = control.createMock(SoapMessage.class);
- Exchange exchange = control.createMock(Exchange.class);
- expect(message.getExchange()).andReturn(exchange);
- expect(message.keySet()).andReturn(new HashSet<String>());
- expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker);
- control.replay();
-
- SOAPHandlerInterceptor li = new SOAPHandlerInterceptor(binding);
- li.handleMessage(message);
- control.verify();
- }
-
- public void testgetUnderstoodHeadersReturnsNull() {
- List<Handler> list = new ArrayList<Handler>();
- list.add(new SOAPHandler<SOAPMessageContext>() {
- public boolean handleMessage(SOAPMessageContext smc) {
- return true;
- }
-
- public boolean handleFault(SOAPMessageContext smc) {
- return true;
- }
-
- public Set<QName> getHeaders() {
- return null;
- }
-
- public void close(MessageContext messageContext) {
- }
- });
- HandlerChainInvoker invoker = new HandlerChainInvoker(list);
-
- IMocksControl control = createNiceControl();
- Binding binding = control.createMock(Binding.class);
- SoapMessage message = control.createMock(SoapMessage.class);
- Exchange exchange = control.createMock(Exchange.class);
- expect(binding.getHandlerChain()).andReturn(list);
- expect(message.getExchange()).andReturn(exchange);
- expect(message.keySet()).andReturn(new HashSet<String>());
- expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker);
- control.replay();
-
- SOAPHandlerInterceptor li = new SOAPHandlerInterceptor(binding);
- Set<QName> understood = li.getUnderstoodHeaders();
- assertNotNull(understood);
- assertTrue(understood.isEmpty());
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxws.handler.soap;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Binding;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.jaxws.handler.HandlerChainInvoker;
+import org.apache.cxf.message.Exchange;
+
+import org.easymock.classextension.IMocksControl;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.classextension.EasyMock.createNiceControl;
+
+public class SOAPHandlerInterceptorTest extends TestCase {
+
+ public void setUp() {
+ }
+
+ public void tearDown() {
+ }
+
+ public void testInterceptSuccess() {
+ List<Handler> list = new ArrayList<Handler>();
+ list.add(new SOAPHandler<SOAPMessageContext>() {
+ public boolean handleMessage(SOAPMessageContext smc) {
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext smc) {
+ return true;
+ }
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ public void close(MessageContext messageContext) {
+ }
+ });
+ HandlerChainInvoker invoker = new HandlerChainInvoker(list);
+
+ IMocksControl control = createNiceControl();
+ Binding binding = control.createMock(Binding.class);
+ SoapMessage message = control.createMock(SoapMessage.class);
+ Exchange exchange = control.createMock(Exchange.class);
+ expect(message.getExchange()).andReturn(exchange);
+ expect(message.keySet()).andReturn(new HashSet<String>());
+ expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker);
+ control.replay();
+
+ SOAPHandlerInterceptor li = new SOAPHandlerInterceptor(binding);
+ li.handleMessage(message);
+ control.verify();
+ }
+
+ public void testgetUnderstoodHeadersReturnsNull() {
+ List<Handler> list = new ArrayList<Handler>();
+ list.add(new SOAPHandler<SOAPMessageContext>() {
+ public boolean handleMessage(SOAPMessageContext smc) {
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext smc) {
+ return true;
+ }
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ public void close(MessageContext messageContext) {
+ }
+ });
+ HandlerChainInvoker invoker = new HandlerChainInvoker(list);
+
+ IMocksControl control = createNiceControl();
+ Binding binding = control.createMock(Binding.class);
+ SoapMessage message = control.createMock(SoapMessage.class);
+ Exchange exchange = control.createMock(Exchange.class);
+ expect(binding.getHandlerChain()).andReturn(list);
+ expect(message.getExchange()).andReturn(exchange);
+ expect(message.keySet()).andReturn(new HashSet<String>());
+ expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker);
+ control.replay();
+
+ SOAPHandlerInterceptor li = new SOAPHandlerInterceptor(binding);
+ Set<QName> understood = li.getUnderstoodHeaders();
+ assertNotNull(understood);
+ assertTrue(understood.isEmpty());
+ }
+
+}
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date