Author: coheigea
Date: Fri Sep 16 10:26:33 2011
New Revision: 1171493
URL: http://svn.apache.org/viewvc?rev=1171493&view=rev
Log:
[CXF-2924] - Re-enable some unit tests
Modified:
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
Modified:
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java?rev=1171493&r1=1171492&r2=1171493&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
Fri Sep 16 10:26:33 2011
@@ -290,23 +290,6 @@ public abstract class AbstractPolicySecu
return msg.getContent(SOAPMessage.class).getSOAPPart();
}
- // TODO: This method can be removed when
testAsymmetricBindingAlgorithmSuitePolicy
- // is cleaned up by adding server side enforcement of signature related
algorithms.
- protected void runOutInterceptorAndValidateAsymmetricBinding(String
policyDoc) throws Exception {
- final Document originalDoc =
this.readDocument("wsse-request-clean.xml");
-
- final Element outPolicyElement =
- this.readDocument(policyDoc).getDocumentElement();
-
- final Policy outPolicy =
this.policyBuilder.getPolicy(outPolicyElement);
- final AssertionInfoMap aim = new AssertionInfoMap(outPolicy);
-
- final Document signedDoc = this.runOutInterceptorAndValidate(
- originalDoc, outPolicy,
Arrays.asList(SP12Constants.ASYMMETRIC_BINDING), null);
-
- this.verifySignatureAlgorithms(signedDoc, aim);
- }
-
// TODO: This method can be removed or reduced when
testSignedElementsWithIssuedSAMLToken is
// cleaned up.
protected void runOutInterceptorAndValidateSamlTokenAttached(String
policyDoc) throws Exception {
Modified:
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java?rev=1171493&r1=1171492&r2=1171493&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
Fri Sep 16 10:26:33 2011
@@ -81,13 +81,24 @@ public class PolicyBasedWss4JInOutTest e
new ArrayList<CoverageType>());
}
- // TODO this test does not follow the traditional pattern as no
server-side enforcement
- // of algorithm suites yet exists. This support is blocked on WSS4J
patches. In the interim
- // the outbound side is tested ONLY.
@Test
public void testAsymmetricBindingAlgorithmSuitePolicy() throws Exception {
-
runOutInterceptorAndValidateAsymmetricBinding("signed_elements_policy.xml");
-
runOutInterceptorAndValidateAsymmetricBinding("signed_elements_Basic256Sha256_policy.xml");
+ this.runAndValidate(
+ "wsse-request-clean.xml",
+ "signed_elements_policy.xml",
+ Arrays.asList(SP12Constants.ASYMMETRIC_BINDING),
+ null,
+ Arrays.asList(SP12Constants.ASYMMETRIC_BINDING),
+ null,
+ Arrays.asList(CoverageType.SIGNED));
+ this.runAndValidate(
+ "wsse-request-clean.xml",
+ "signed_elements_Basic256Sha256_policy.xml",
+ Arrays.asList(SP12Constants.ASYMMETRIC_BINDING),
+ null,
+ Arrays.asList(SP12Constants.ASYMMETRIC_BINDING),
+ null,
+ Arrays.asList(CoverageType.SIGNED));
}
// TODO this test does not follow the traditional pattern as no
server-side enforcement