aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java')
-rw-r--r--moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java57
1 files changed, 29 insertions, 28 deletions
diff --git a/moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java b/moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
index 64c0c8b..51d323b 100644
--- a/moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
+++ b/moaSig/moa-sig-lib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
@@ -27,6 +27,7 @@ package test.at.gv.egovernment.moa.spss.server.invoke;
import java.util.List;
import java.util.Map;
+import org.junit.Assert;
import org.w3c.dom.Document;
import at.gv.egovernment.moa.spss.MOAApplicationException;
@@ -76,8 +77,8 @@ public class TransformationFactoryTest extends SPSSTestCase {
transformParser.parseTransform(transform.getDocumentElement());
Transformation t = factory.createTransformation(tr);
- assertTrue(t instanceof Canonicalization);
- assertEquals(
+ Assert.assertTrue(t instanceof Canonicalization);
+ Assert.assertEquals(
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
t.getAlgorithmURI());
}
@@ -89,8 +90,8 @@ public class TransformationFactoryTest extends SPSSTestCase {
transformParser.parseTransform(transform.getDocumentElement());
Transformation t = factory.createTransformation(tr);
- assertTrue(t instanceof Canonicalization);
- assertEquals(
+ Assert.assertTrue(t instanceof Canonicalization);
+ Assert.assertEquals(
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",
t.getAlgorithmURI());
}
@@ -100,7 +101,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
Transform tr =
transformParser.parseTransform(transform.getDocumentElement());
Transformation t = factory.createTransformation(tr);
- assertTrue(t instanceof Base64Transformation);
+ Assert.assertTrue(t instanceof Base64Transformation);
}
public void testCreateEnvelopedSignature() throws Exception {
@@ -108,7 +109,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
Transform tr =
transformParser.parseTransform(transform.getDocumentElement());
Transformation t = factory.createTransformation(tr);
- assertTrue(t instanceof EnvelopedSignatureTransformation);
+ Assert.assertTrue(t instanceof EnvelopedSignatureTransformation);
}
public void testXPathTransformation() throws Exception {
@@ -118,10 +119,10 @@ public class TransformationFactoryTest extends SPSSTestCase {
Transformation t = factory.createTransformation(tr);
Map nsDecls;
- assertTrue(t instanceof XPathTransformation);
+ Assert.assertTrue(t instanceof XPathTransformation);
nsDecls = ((XPathTransformation) t).getNamespaceDeclarations();
- assertEquals(1, nsDecls.size());
- assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
+ Assert.assertEquals(1, nsDecls.size());
+ Assert.assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
}
public void testCreateXPath2Transformation() throws Exception {
@@ -129,7 +130,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
Transform tr =
transformParser.parseTransform(transform.getDocumentElement());
Transformation t = factory.createTransformation(tr);
- assertTrue(t instanceof XPath2Transformation);
+ Assert.assertTrue(t instanceof XPath2Transformation);
}
public void testCreateXSLTTransformation() throws Exception {
@@ -138,7 +139,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
transformParser.parseTransform(transform.getDocumentElement());
XSLTTransformation t =
(XSLTTransformation) factory.createTransformation(tr);
- assertNotNull(t.getStylesheetElement());
+ Assert.assertNotNull(t.getStylesheetElement());
}
public void testCreateWithIllegalAlgorithm() throws Exception {
@@ -147,7 +148,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
Transform tr =
transformParser.parseTransform(transform.getDocumentElement());
factory.createTransformation(tr);
- fail();
+ Assert.fail();
} catch (MOAApplicationException e) {
}
}
@@ -168,13 +169,13 @@ public class TransformationFactoryTest extends SPSSTestCase {
Document canonicalization =
parseXml(TESTDATA_BASE + "canonicalization.xml");
- assertTrue(trXslt.equals(trXsltEqu));
- assertFalse(trXslt.equals(trXsltDiff));
- assertFalse(trXsltEqu.equals(trXsltDiff));
- assertEquals(trXslt.hashCode(), trXsltEqu.hashCode());
- assertFalse(trXslt.hashCode() == trXsltDiff.hashCode());
- assertFalse(trXsltEqu.hashCode() == trXsltDiff.hashCode());
- assertFalse(trXslt.equals(canonicalization));
+ Assert.assertTrue(trXslt.equals(trXsltEqu));
+ Assert.assertFalse(trXslt.equals(trXsltDiff));
+ Assert.assertFalse(trXsltEqu.equals(trXsltDiff));
+ Assert.assertEquals(trXslt.hashCode(), trXsltEqu.hashCode());
+ Assert.assertFalse(trXslt.hashCode() == trXsltDiff.hashCode());
+ Assert.assertFalse(trXsltEqu.hashCode() == trXsltDiff.hashCode());
+ Assert.assertFalse(trXslt.equals(canonicalization));
}
public void testEqualsXPath() throws Exception {
@@ -187,10 +188,10 @@ public class TransformationFactoryTest extends SPSSTestCase {
tr = transformParser.parseTransform(xpathDiff.getDocumentElement());
Transformation trXpathDiff = factory.createTransformation(tr);
- assertTrue(trXpath.equals(trXpathEqu));
- assertEquals(trXpath.hashCode(), trXpathEqu.hashCode());
- assertFalse(trXpath.equals(trXpathDiff));
- assertFalse(trXpath.hashCode() == trXpathDiff.hashCode());
+ Assert.assertTrue(trXpath.equals(trXpathEqu));
+ Assert.assertEquals(trXpath.hashCode(), trXpathEqu.hashCode());
+ Assert.assertFalse(trXpath.equals(trXpathDiff));
+ Assert.assertFalse(trXpath.hashCode() == trXpathDiff.hashCode());
}
public void testEqualsXPath2() throws Exception {
@@ -203,10 +204,10 @@ public class TransformationFactoryTest extends SPSSTestCase {
tr = transformParser.parseTransform(xpath2Diff.getDocumentElement());
Transformation trXpath2Diff = factory.createTransformation(tr);
- assertTrue(trXpath2.equals(trXpath2Equ));
- assertEquals(trXpath2.hashCode(), trXpath2Equ.hashCode());
- assertFalse(trXpath2.equals(trXpath2Diff));
- assertFalse(trXpath2.hashCode() == trXpath2Diff.hashCode());
+ Assert.assertTrue(trXpath2.equals(trXpath2Equ));
+ Assert.assertEquals(trXpath2.hashCode(), trXpath2Equ.hashCode());
+ Assert.assertFalse(trXpath2.equals(trXpath2Diff));
+ Assert.assertFalse(trXpath2.hashCode() == trXpath2Diff.hashCode());
}
public void testCreateTransformationList() throws Exception {
@@ -214,7 +215,7 @@ public class TransformationFactoryTest extends SPSSTestCase {
List trs = transformParser.parseTransforms(transforms.getDocumentElement());
List transformationList = factory.createTransformationList(trs);
- assertEquals(3, transformationList.size());
+ Assert.assertEquals(3, transformationList.size());
}
}