You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2013/07/15 13:29:18 UTC

svn commit: r1503181 - /cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java

Author: coheigea
Date: Mon Jul 15 11:29:17 2013
New Revision: 1503181

URL: http://svn.apache.org/r1503181
Log:
Re-enabling tests following fix for WSS-462

Modified:
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java?rev=1503181&r1=1503180&r2=1503181&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java (original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java Mon Jul 15 11:29:17 2013
@@ -246,8 +246,6 @@ public class StaxBindingPropertiesTest e
         SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
-        /*
-         * TODO - See WSS-462
         // This should fail, as the client is not following the correct steps for this property
         portQName = new QName(NAMESPACE, "DoubleItEncryptBeforeSigningPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -258,8 +256,7 @@ public class StaxBindingPropertiesTest e
             port.doubleIt(25);
             fail("Failure expected on not encrypting before signing");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            System.out.println("ERR: " + ex.getMessage());
-            String error = "Not encrypted before signed";
+            String error = "Policy enforces EncryptBeforeSigning";
             assertTrue(ex.getMessage().contains(error));
         }
         
@@ -269,10 +266,10 @@ public class StaxBindingPropertiesTest e
             port.doubleIt(25);
             fail("Failure expected on not encrypting before signing");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            // String error = "Not encrypted before signed";
+            // String error = "Policy enforces EncryptBeforeSigning";
             // assertTrue(ex.getMessage().contains(error));
         }
-        */
+        
         
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
@@ -303,8 +300,6 @@ public class StaxBindingPropertiesTest e
         SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
-        /*
-         * TODO - See WSS-462
         // This should fail, as the client is not following the correct steps for this property
         portQName = new QName(NAMESPACE, "DoubleItSignBeforeEncryptingPort2");
         port = service.getPort(portQName, DoubleItPortType.class);
@@ -315,7 +310,7 @@ public class StaxBindingPropertiesTest e
             port.doubleIt(25);
             fail("Failure expected on not signing before encrypting");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = "Not signed before encrypted";
+            String error = "Policy enforces SignBeforeEncrypting";
             assertTrue(ex.getMessage().contains(error));
         }
         
@@ -325,10 +320,10 @@ public class StaxBindingPropertiesTest e
             port.doubleIt(25);
             fail("Failure expected on not signing before encrypting");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            // String error = "Not signed before encrypted";
+            // String error = "Policy enforces SignBeforeEncrypting";
             // assertTrue(ex.getMessage().contains(error));
         }
-        */
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }