cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r790644 - /cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java
Date Thu, 02 Jul 2009 16:20:02 GMT
Author: dkulp
Date: Thu Jul  2 16:20:01 2009
New Revision: 790644

URL: http://svn.apache.org/viewvc?rev=790644&view=rev
Log:
Fix broken test.   Use JUnit assert* instead of JDK assert so if -ea is
not specified (like default in eclipse), the failures are consistent.

Modified:
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java?rev=790644&r1=790643&r2=790644&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SignatureConfirmationTest.java
Thu Jul  2 16:20:01 2009
@@ -77,6 +77,7 @@
         msg.setContent(SOAPMessage.class, saajMsg);
 
         msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
+        msg.put(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
         msg.put(WSHandlerConstants.SIG_PROP_FILE, "META-INF/cxf/outsecurity.properties");
         msg.put(WSHandlerConstants.USER, "myalias");
         msg.put("password", "myAliasPassword");
@@ -97,9 +98,9 @@
         // Save the signature for future confirmation
         //
         Object sigv = msg.get(WSHandlerConstants.SEND_SIGV);
-        assert sigv != null;
-        assert sigv instanceof List;
-        assert ((List<Object>)sigv).size() != 0;
+        assertNotNull(sigv);
+        assertTrue(sigv instanceof List);
+        assertTrue(((List<Object>)sigv).size() != 0);
         List<Object> sigSaved = (List<Object>)sigv;
         
         XMLStreamReader reader = StaxUtils.createXMLStreamReader(new ByteArrayInputStream(docbytes));
@@ -123,6 +124,7 @@
 
         inHandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
         inHandler.setProperty(WSHandlerConstants.SIG_PROP_FILE, "META-INF/cxf/insecurity.properties");
+        inHandler.setProperty(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
 
         inHandler.handleMessage(inmsg);
         
@@ -134,8 +136,8 @@
         assertNotNull(result);
         
         List<Object> sigReceived = (List<Object>)inmsg.get(WSHandlerConstants.RECV_RESULTS);
-        assert sigReceived != null;
-        assert sigReceived.size() != 0;
+        assertNotNull(sigReceived);
+        assertTrue(sigReceived.size() != 0);
         
         testSignatureConfirmationResponse(sigSaved, sigReceived);
     }



Mime
View raw message