Package org.opensaml.core.xml
Class NamespaceManagerTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.core.xml.NamespaceManagerTest
-
public class NamespaceManagerTest extends XMLObjectBaseTestCase
Test the NamespaceManger used by XMLObjects.
-
-
Field Summary
Fields Modifier and Type Field Description private static QNameelementNameprivate static Stringns1Prefixprivate static Stringns1uriprivate static Stringns2Prefixprivate static Stringns2uriprivate static Stringns3Prefixprivate static Stringns3uriprivate static Stringns4Prefixprivate static Stringns4uriprivate NamespaceManagernsManagerprivate static QNametypeNameprivate XSAnyxsAnyprivate XMLObjectBuilder<XSAny>xsAnyBuilderprivate static QNamexsiTypeName-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description NamespaceManagerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private NamespacebuildNamespace(QName name)private voidcheckNamespaces(XMLObject xo, Integer nsSize, QName... names)Check the namespaces produced by the object against the supplied list of QNames.private voidcheckPrefixes(NamespaceManager manager, String... controlPrefixes)private booleanequals(Namespace ns1, Namespace ns2)private NamespacefindNamespace(NamespaceManager manager, Namespace ns)protected voidsetUp()voidtestNonVisibleNamespacePrefixes()voidtestNSDeclaration()voidtestObjectName()voidtestObjectType()voidtestQNameAttributeValue()voidtestQNameElementContent()voidtestQualifiedAttributes()-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
xsAny
private XSAny xsAny
-
nsManager
private NamespaceManager nsManager
-
ns1uri
private static String ns1uri
-
ns1Prefix
private static String ns1Prefix
-
ns2uri
private static String ns2uri
-
ns2Prefix
private static String ns2Prefix
-
ns3uri
private static String ns3uri
-
ns3Prefix
private static String ns3Prefix
-
ns4uri
private static String ns4uri
-
ns4Prefix
private static String ns4Prefix
-
elementName
private static QName elementName
-
typeName
private static QName typeName
-
xsiTypeName
private static QName xsiTypeName
-
xsAnyBuilder
private XMLObjectBuilder<XSAny> xsAnyBuilder
-
-
Method Detail
-
testObjectName
public void testObjectName()
-
testObjectType
public void testObjectType()
-
testQNameElementContent
public void testQNameElementContent()
-
testQualifiedAttributes
public void testQualifiedAttributes()
-
testQNameAttributeValue
public void testQNameAttributeValue()
-
testNSDeclaration
public void testNSDeclaration()
-
testNonVisibleNamespacePrefixes
public void testNonVisibleNamespacePrefixes()
-
checkPrefixes
private void checkPrefixes(NamespaceManager manager, String... controlPrefixes)
-
checkNamespaces
private void checkNamespaces(XMLObject xo, Integer nsSize, QName... names)
Check the namespaces produced by the object against the supplied list of QNames.- Parameters:
xo- the XMLObject to evaluatensSize- the expected size of the XMLObject's namespace set (may be different than the size of the names list due to duplicates in the latter)names- the list of names to check
-
findNamespace
private Namespace findNamespace(NamespaceManager manager, Namespace ns)
-
-