[picketlink-commits] Picketlink SVN: r556 - in integration-tests/trunk/picketlink-sts-tests: src/test/java/org/picketlink/test/integration/sts and 1 other directory.

picketlink-commits at lists.jboss.org picketlink-commits at lists.jboss.org
Wed Nov 17 11:22:53 EST 2010


Author: sguilhen at redhat.com
Date: 2010-11-17 11:22:52 -0500 (Wed, 17 Nov 2010)
New Revision: 556

Modified:
   integration-tests/trunk/picketlink-sts-tests/.classpath
   integration-tests/trunk/picketlink-sts-tests/.project
   integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java
Log:
PLFED-119: changed integration tests to use Stax

Modified: integration-tests/trunk/picketlink-sts-tests/.classpath
===================================================================
--- integration-tests/trunk/picketlink-sts-tests/.classpath	2010-11-17 13:41:00 UTC (rev 555)
+++ integration-tests/trunk/picketlink-sts-tests/.classpath	2010-11-17 16:22:52 UTC (rev 556)
@@ -1,18 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry kind="src" path="src/test/resources"/>
-	<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/ant/ant/1.5/ant-1.5.jar"/>
-	<classpathentry kind="var" path="M2_REPO/ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar" sourcepath="M2_REPO/ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/httpunit/httpunit/1.7/httpunit-1.7.jar" sourcepath="M2_REPO/httpunit/httpunit/1.7/httpunit-1.7-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/rhino/js/1.6R7/js-1.6R7.jar"/>
-	<classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar" sourcepath="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/1.9.12/nekohtml-1.9.12.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/picketlink/picketlink-fed/1.0.4-SNAPSHOT/picketlink-fed-1.0.4-SNAPSHOT.jar" sourcepath="M2_REPO/org/picketlink/picketlink-fed/1.0.4-SNAPSHOT/picketlink-fed-1.0.4-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: integration-tests/trunk/picketlink-sts-tests/.project
===================================================================
--- integration-tests/trunk/picketlink-sts-tests/.project	2010-11-17 13:41:00 UTC (rev 555)
+++ integration-tests/trunk/picketlink-sts-tests/.project	2010-11-17 16:22:52 UTC (rev 556)
@@ -6,8 +6,12 @@
     <buildCommand>
       <name>org.eclipse.jdt.core.javabuilder</name>
     </buildCommand>
+    <buildCommand>
+      <name>org.maven.ide.eclipse.maven2Builder</name>
+    </buildCommand>
   </buildSpec>
   <natures>
     <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.maven.ide.eclipse.maven2Nature</nature>
   </natures>
 </projectDescription>
\ No newline at end of file

Modified: integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java
===================================================================
--- integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java	2010-11-17 13:41:00 UTC (rev 555)
+++ integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java	2010-11-17 16:22:52 UTC (rev 556)
@@ -40,6 +40,7 @@
 import org.junit.Test;
 import org.picketlink.identity.federation.api.wstrust.WSTrustClient;
 import org.picketlink.identity.federation.api.wstrust.WSTrustClient.SecurityInfo;
+import org.picketlink.identity.federation.core.util.Base64;
 import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
 import org.picketlink.identity.federation.core.wstrust.WSTrustUtil;
 import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
@@ -260,12 +261,11 @@
       byte[] clientSecret = WSTrustUtil.createRandomSecret(16);
       BinarySecretType clientBinarySecret = new BinarySecretType();
       clientBinarySecret.setType(WSTrustConstants.BS_TYPE_NONCE);
-      clientBinarySecret.setValue(clientSecret);
+      clientBinarySecret.setValue(Base64.encodeBytes(clientSecret).getBytes());
 
       // set the client secret in the client entropy.
       EntropyType clientEntropy = new EntropyType();
-      clientEntropy.getAny().add(
-            new org.picketlink.identity.federation.ws.trust.ObjectFactory().createBinarySecret(clientBinarySecret));
+      clientEntropy.getAny().add(clientBinarySecret);
       request.setEntropy(clientEntropy);
 
       // dispatch the request and get the issued assertion.
@@ -301,10 +301,8 @@
       request.setKeyType(URI.create(WSTrustConstants.KEY_TYPE_PUBLIC));
 
       // include a UseKey section that specifies the certificate in the request.
-      JAXBElement<byte[]> certElement = new org.picketlink.identity.xmlsec.w3.xmldsig.ObjectFactory()
-            .createX509DataTypeX509Certificate(certificate.getEncoded());
       UseKeyType useKey = new UseKeyType();
-      useKey.setAny(certElement);
+      useKey.setAny(Base64.encodeBytes(certificate.getEncoded()).getBytes());
       request.setUseKey(useKey);
 
       // dispatch the request and get the issued assertion.
@@ -339,7 +337,7 @@
       // include a UseKey section that sets the public key in the request.
       KeyValueType keyValue = WSTrustUtil.createKeyValue(certificate.getPublicKey());
       UseKeyType useKey = new UseKeyType();
-      useKey.setAny(new org.picketlink.identity.xmlsec.w3.xmldsig.ObjectFactory().createKeyValue(keyValue));
+      useKey.setAny(keyValue);
       request.setUseKey(useKey);
 
       // dispatch the request and get the issued assertion.



More information about the picketlink-commits mailing list