summaryrefslogtreecommitdiff
path: root/utils/src/test/java/at/gv/egiz
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-02-26 19:39:00 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-02-26 19:39:00 +0000
commit6576428966f1e3d688269a407b072fb01f9f7647 (patch)
treef79a9c3c70c27477133c9283dd4b0440b7559d05 /utils/src/test/java/at/gv/egiz
parentbd18d9084fd139aaae40ad8d525c1d0e626f2e5e (diff)
downloadmocca-6576428966f1e3d688269a407b072fb01f9f7647.tar.gz
mocca-6576428966f1e3d688269a407b072fb01f9f7647.tar.bz2
mocca-6576428966f1e3d688269a407b072fb01f9f7647.zip
1.1 candidate (activation)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@309 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'utils/src/test/java/at/gv/egiz')
-rw-r--r--utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java29
1 files changed, 27 insertions, 2 deletions
diff --git a/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java
index 99d353ac..7c8c206a 100644
--- a/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java
+++ b/utils/src/test/java/at/gv/egiz/slbinding/RedirectTest.java
@@ -52,6 +52,8 @@ import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import static org.junit.Assert.*;
+import org.w3._2000._09.xmldsig_.TransformType;
+import org.w3._2000._09.xmldsig_.TransformsType;
/**
*
@@ -131,11 +133,34 @@ public class RedirectTest {
Iterator<TransformsInfoType> tiIt = transformsInfos.iterator();
while (tiIt.hasNext()) {
at.gv.egiz.slbinding.impl.TransformsInfoType ti = (at.gv.egiz.slbinding.impl.TransformsInfoType) tiIt.next();
+// TransformsInfoType ti = tiIt.next();
assertNotNull(ti);
- System.out.println("found at.gv.egiz.slbinding.impl.TransformsInfoType TransformsInfo");
+ System.out.println("found sl:TransformsInfo: " + ti.getClass().getName()); //at.gv.egiz.slbinding.impl.TransformsInfoType TransformsInfo");
+// TransformsType ts = ti.getTransforms();
+// assertNotNull(ts);
+// System.out.println("found dsig:Transforms " + ts.getClass().getName()); //org.w3._2000._09.xmldsig_.TransformsType dsig:Transforms");
+// List<TransformType> tL = ts.getTransform();
+// assertNotNull(tL);
+// System.out.println("found " + tL.size() + " org.w3._2000._09.xmldsig_.TransformType dsig:Transform");
+// for (TransformType t : tL) {
+// if (t instanceof at.gv.egiz.slbinding.impl.TransformType) {
+// System.out.println("found at.gv.egiz.slbinding.impl.TransformType");
+// byte[] redirectedBytes = ((at.gv.egiz.slbinding.impl.TransformType) t).getRedirectedStream().toByteArray();
+// if (redirectedBytes != null && redirectedBytes.length > 0) {
+// System.out.println("reading redirected stream...");
+// os.write("--- redirected Transform ---".getBytes());
+// os.write(redirectedBytes);
+// os.write("\n".getBytes());
+// } else {
+// System.out.println("no redirected stream");
+// }
+// }
+// }
+
ByteArrayOutputStream dsigTransforms = ti.getRedirectedStream();
+ os.write("--- redirected TransformsInfo content ---".getBytes());
os.write(dsigTransforms.toByteArray());
- os.write("\n".getBytes());
+ os.write("\n---".getBytes());
MetaInfoType mi = ti.getFinalDataMetaInfo();
assertNotNull(mi);