You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2008/08/08 10:31:51 UTC

svn commit: r683907 - in /webservices/axis2/trunk/java/modules: addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java

Author: pradine
Date: Fri Aug  8 01:31:49 2008
New Revision: 683907

URL: http://svn.apache.org/viewvc?rev=683907&view=rev
Log:
Fix unit test failure.

Added:
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java   (with props)
Modified:
    webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java

Modified: webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java?rev=683907&r1=683906&r2=683907&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java Fri Aug  8 01:31:49 2008
@@ -78,18 +78,6 @@
         }
     }
 
-// TODO - commenting this out for the moment to get the build working.  This should either go away or get fixed!
-//    public void testValidateActionFlag() throws Exception {
-//        MessageContext mc = testAddressingMessage("valid-messages", "soapmessage.xml");
-//
-//        // Tell validation handler NOT to check action dispatch
-//        mc.setProperty(AddressingConstants.ADDR_VALIDATE_ACTION, Boolean.FALSE);
-//
-//        // Even though this message has an action that will not dispatch to an
-//        // AxisOperation, this shouldn't throw a fault.
-//        validationHandler.invoke(mc);
-//    }
-
     public void testMessageWithOmittedMessageIDInOnlyMEP() throws Exception {
         MessageContext messageContext = testMessageWithOmittedHeaders("noMessageID");
         String messageID = messageContext.getOptions().getMessageId();

Added: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java?rev=683907&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java Fri Aug  8 01:31:49 2008
@@ -0,0 +1,42 @@
+/*
+ * 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.axis2.dispatchers;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.context.MessageContext;
+
+public class AddressingBasedDispatcherTest extends TestCase {
+
+    public void testValidateActionFlag() throws Exception {
+        MessageContext mc = new MessageContext();
+        
+        //Indicate that the AddressingInHandler has run.
+        mc.setProperty(AddressingConstants.IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.TRUE);
+
+        // Tell validation handler NOT to check action dispatch
+        mc.setProperty(AddressingConstants.ADDR_VALIDATE_ACTION, Boolean.FALSE);
+
+        // Even though this message has an action that will not dispatch to an
+        // AxisOperation, this shouldn't throw a fault.
+        AddressingBasedDispatcher dispatcher = new AddressingBasedDispatcher();
+        dispatcher.invoke(mc);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/AddressingBasedDispatcherTest.java
------------------------------------------------------------------------------
    svn:eol-style = native