From b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 5 May 2010 15:29:01 +0000 Subject: Merged feature branch mocca-1.2.13-id@r724 back to trunk. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- utils/src/test/java/saml/KeyValueAttributeTypeTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'utils/src/test/java/saml') diff --git a/utils/src/test/java/saml/KeyValueAttributeTypeTest.java b/utils/src/test/java/saml/KeyValueAttributeTypeTest.java index 2df04ce6..f3f1da0b 100644 --- a/utils/src/test/java/saml/KeyValueAttributeTypeTest.java +++ b/utils/src/test/java/saml/KeyValueAttributeTypeTest.java @@ -17,9 +17,7 @@ package saml; -import java.io.BufferedInputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.List; import javax.xml.bind.JAXBContext; @@ -27,7 +25,6 @@ import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; -import javax.xml.namespace.QName; import oasis.names.tc.saml._1_0.assertion.AnyType; import oasis.names.tc.saml._1_0.assertion.AssertionType; import oasis.names.tc.saml._1_0.assertion.AttributeStatementType; @@ -38,7 +35,6 @@ import oasis.names.tc.saml._1_0.assertion.StatementAbstractType; import oasis.names.tc.saml._1_0.assertion.SubjectType; import org.junit.Ignore; import org.junit.Test; -import org.w3._2000._09.xmldsig_.KeyValueType; import org.w3._2000._09.xmldsig_.RSAKeyValueType; import org.w3c.dom.Element; @@ -54,8 +50,9 @@ public class KeyValueAttributeTypeTest { JAXBContext ctx = JAXBContext.newInstance(ObjectFactory.class, org.w3._2000._09.xmldsig_.ObjectFactory.class); Unmarshaller um = ctx.createUnmarshaller(); - JAXBElement assertion = (JAXBElement) um.unmarshal(new File("/home/clemens/workspace/schema-base/src/main/schema/test/saml10.xml")); - List statements = assertion.getValue().getStatementOrSubjectStatementOrAuthenticationStatement(); + JAXBElement assertion = (JAXBElement) um.unmarshal(new File("/home/clemens/workspace/schema-base/src/main/schema/test/saml10.xml")); + AssertionType value = (AssertionType) assertion.getValue(); + List statements = ((AssertionType) value).getStatementOrSubjectStatementOrAuthenticationStatement(); for (StatementAbstractType stmt : statements) { if (stmt instanceof AttributeStatementType) { System.out.println("AttributeStatement"); -- cgit v1.2.3