Package org.apache.axiom.ts.om.element

Class Summary
TestAddAttributeAlreadyOwnedByElement Test that calling OMElement.addAttribute(OMAttribute) with an attribute that is already owned by the element is a no-op.
TestAddAttributeAlreadyOwnedByOtherElement Test that calling OMElement.addAttribute(OMAttribute) with an attribute that is already owned by another element will clone the attribute.
TestAddAttributeFromOMAttributeMultiple Tests that when OMElement.addAttribute(org.apache.axiom.om.OMAttribute) is called multiple times for attributes with different namespaces, each call adds a corresponding namespace declaration.
TestAddAttributeFromOMAttributeWithExistingName  
TestAddAttributeReplace1 Test that OMElement.addAttribute(OMAttribute) behaves correctly when an attribute with the same name and namespace URI already exists.
TestAddAttributeReplace2 Test that OMElement.addAttribute(String, String, OMNamespace) behaves correctly when an attribute with the same name and namespace URI already exists.
TestAddAttributeWithExistingNamespaceDeclarationInScope Tests OMElement.addAttribute(OMAttribute) doesn't create an additional namespace declaration if a corresponding declaration is already in scope.
TestAddAttributeWithExistingNamespaceDeclarationOnSameElement Tests OMElement.addAttribute(OMAttribute) doesn't create an additional namespace declaration if a corresponding declaration already exists on the element.
TestAddAttributeWithInvalidNamespace  
TestAddAttributeWithMaskedNamespaceDeclaration Test checking that OMElement.addAttribute(OMAttribute) correctly generates a new namespace declaration if an equivalent namespace declaration exists but is masked.
TestAddAttributeWithoutExistingNamespaceDeclaration Tests that OMElement.addAttribute(OMAttribute) adds a namespace declaration if the attribute has a namespace and a corresponding namespace declaration doesn't exist yet.
TestAddAttributeWithoutNamespace Tests that OMElement.addAttribute(OMAttribute) doesn't add any namespace declarations if the attribute has no namespace.
TestAddChild  
TestAddChild2  
TestAddChildIncomplete Tests the behavior of OMContainer.addChild(OMNode) if the parent has not been built completely.
TestAddChildWithParent Test that OMContainer.addChild(org.apache.axiom.om.OMNode) behaves correctly if the child to be added already has a parent.
TestAddChildWithSameParent Tests the behavior of OMContainer.addChild(OMNode) when used to add a node to an element it is already a child of.
TestChildReDeclaringGrandParentsDefaultNSWithPrefix  
TestChildReDeclaringParentsDefaultNSWithPrefix  
TestCloneOMElement  
TestCloneOMElement2  
TestCloneOMElementNamespaceRepairing Tests that OMElement.cloneOMElement() performs namespace repairing.
TestDeclareDefaultNamespace1  
TestDeclareDefaultNamespace2  
TestDeclareDefaultNamespaceConflict1 Tests that OMElement.declareDefaultNamespace(String) throws an exception if an attempt is made to add a namespace declaration that would conflict with the namespace information of the element.
TestDeclareDefaultNamespaceConflict2 Tests that OMElement.declareDefaultNamespace(String) throws an exception if an attempt is made to add a namespace declaration that would conflict with the namespace information of the element.
TestDeclareNamespace1  
TestDeclareNamespaceInvalid1 Tests Axiom's behavior when OMElement.declareNamespace(String, String) is used to add a namespace declaration that binds a prefix to an empty namespace URI.
TestDeclareNamespaceInvalid2 Tests Axiom's behavior when OMElement.declareNamespace(OMNamespace) is used to add a namespace declaration that binds a prefix to an empty namespace URI.
TestDeclareNamespaceWithGeneratedPrefix1 Tests that OMElement.declareNamespace(OMNamespace) generates a new prefix if the prefix specified in the OMNamespace object is null.
TestDeclareNamespaceWithGeneratedPrefix2 Tests that OMElement.declareNamespace(String, String) generates a new prefix if the specified prefix is empty.
TestDeclareNamespaceWithGeneratedPrefix3 Tests that OMElement.declareNamespace(String, String) generates a new prefix if the specified prefix is null.
TestDigestWithNamespace  
TestDigestWithoutNamespace  
TestDiscardDocumentElement Tests the behavior of OMNode.discard() on an incomplete OMElement that is a document element, i.e. the parent of which is an OMDocument.
TestDiscardIncomplete Test the discard method
TestDiscardPartiallyBuilt Tests the behavior of OMNode.discard() on an element that is partially built, more precisely in a situation where the builder is building a descendant that is not an immediate child of the element.
TestFindNamespaceByNamespaceURIMasked Tests that OMElement.findNamespace(String, String) returns null if the matching namespace declaration is masked by another namespace declaration, i.e. if the corresponding prefix is redeclared.
TestFindNamespaceByPrefix  
TestFindNamespaceCaseSensitivity  
TestFindNamespaceURIWithPrefixUndeclaring  
TestGetAllAttributes1 Test OMElement.getAllAttributes() on a programmatically created document.
TestGetAllAttributes2 Test OMElement.getAllAttributes() on a parsed document.
TestGetAllDeclaredNamespaces  
TestGetAllDeclaredNamespacesRemove Tests that Iterator.remove() can be used on the iterator returned by OMElement.getAllDeclaredNamespaces() to remove a namespace declaration.
TestGetAttributeValueNonExisting Tests the behavior of OMElement.getAttributeValue(QName) if the element has no attribute with the given QName.
TestGetAttributeValueWithXmlPrefix1 Test that OMElement.getAttributeValue(QName) works properly for an attribute with the xml prefix, even if this prefix is not declared explicitly.
TestGetAttributeValueWithXmlPrefix2 Test that OMElement.getAttributeValue(QName) works properly for an attribute with the xml prefix, even if this prefix is not declared explicitly.
TestGetAttributeWithXmlPrefix1 Test that OMElement.getAttribute(QName) works properly for an attribute with the xml prefix, even if this prefix is not declared explicitly.
TestGetAttributeWithXmlPrefix2 Test that OMElement.getAttribute(QName) works properly for an attribute with the xml prefix, even if this prefix is not declared explicitly.
TestGetChildElements Test the element iterator
TestGetChildElementsConcurrentModification Tests that the iterator returned by OMElement.getChildElements() throws a ConcurrentModificationException if the current node is removed using a method other than Iterator.remove().
TestGetChildren Test the plain iterator which includes all the children (including the texts)
TestGetChildrenConcurrentModification Tests that the iterator returned by OMContainer.getChildren() throws a ConcurrentModificationException if the current node is removed using a method other than Iterator.remove().
TestGetChildrenRemove1 test the remove exception behavior
TestGetChildrenRemove2 test the remove exception behavior, consecutive remove calls
TestGetChildrenRemove3 Remove all!
TestGetChildrenRemove4 test whether the children count reduces.
TestGetChildrenWithLocalName  
TestGetChildrenWithName Test the element iterator
TestGetChildrenWithName2  
TestGetChildrenWithName3 Regression test for AXIOM-166.
TestGetChildrenWithName4  
TestGetChildrenWithNameNextWithoutHasNext Tests that the iterator returned by OMContainer.getChildrenWithName(QName) returns the correct element when Iterator.next() is used without calling Iterator.hasNext() before.
TestGetChildrenWithNamespaceURI Tests the behavior of OMContainer.getChildrenWithNamespaceURI(String).
TestGetDefaultNamespace  
TestGetDefaultNamespace2 Tests the behavior of OMElement.getDefaultNamespace() in the special case where the element has no namespace and was created as a child element of an element having a default namespace with a non empty namespace URI.
TestGetDescendants  
TestGetFirstChildWithName Tests the behavior of OMContainer.getFirstChildWithName(QName).
TestGetFirstChildWithNameOnIncompleteElement Tests the behavior of OMContainer.getFirstChildWithName(QName) on an incomplete element.
TestGetFirstOMChildAfterConsume Tests that OMContainer.getFirstOMChild() throws the expected NodeUnavailableException if the element has been consumed using OMContainer.getXMLStreamReaderWithoutCaching().
TestGetFirstOMChildAfterDiscard Tests that OMContainer.getFirstOMChild() throws the expected NodeUnavailableException if the element has been discarded before the first child could be created.
TestGetNamespaceContext Tests OMElement.getNamespaceContext(boolean).
TestGetNamespaceNormalized Tests that OMNamedInformationItem.getNamespace() returns null for an element with no namespace.
TestGetNamespaceNormalizedWithParser Tests that OMNamedInformationItem.getNamespace() returns null for an element with no namespace.
TestGetNamespaceNormalizedWithSAXSource Tests that OMNamedInformationItem.getNamespace() returns null for an element with no namespace.
TestGetNamespacesInScope  
TestGetNamespacesInScopeWithDefaultNamespace  
TestGetNamespacesInScopeWithMaskedDefaultNamespace  
TestGetNamespacesInScopeWithMaskedNamespace  
TestGetNamespaceURIWithNamespace Tests that OMNamedInformationItem.getNamespaceURI() returns the namespace URI when invoked on an OMElement that has a namespace.
TestGetNamespaceURIWithoutNamespace Tests that OMNamedInformationItem.getNamespaceURI() returns null when invoked on an OMElement that has no namespace.
TestGetPrefixWithDefaultNamespace Tests that OMNamedInformationItem.getPrefix() returns null when invoked on an OMElement that has a namespace without a prefix.
TestGetPrefixWithNamespace Tests that OMNamedInformationItem.getPrefix() returns the prefix when invoked on an OMElement that has a namespace with a prefix.
TestGetPrefixWithoutNamespace Tests that OMNamedInformationItem.getPrefix() returns null when invoked on an OMElement that has no namespace.
TestGetQNameWithNamespace  
TestGetQNameWithoutNamespace  
TestGetText Tests the behavior of OMElement.getText() when invoked on an element with a single child of type OMText.
TestGetTextAsQName Tests the behavior of OMElement.getTextAsQName() for a prefixed QName.
TestGetTextAsQNameEmpty Tests the behavior of OMElement.getTextAsQName() if the element is empty.
TestGetTextAsQNameNoNamespace  
TestGetTextAsQNameWithExtraWhitespace Tests the behavior of OMElement.getTextAsQName() if the element content has extra surrounding whitespace.
TestGetTextAsStreamWithNonTextChildren  
TestGetTextAsStreamWithoutCaching  
TestGetTextAsStreamWithSingleTextNode  
TestGetTextWithCDATASectionChild Tests the behavior of OMElement.getText() when invoked on an element containing both a text node and a CDATA section.
TestGetTextWithMixedOMTextChildren Tests the behavior of OMElement.getText() when invoked on an element containing a single CDATA section.
TestGetXMLStreamReaderCDATAEventFromElement  
TestGetXMLStreamReaderCDATAEventFromParser  
TestGetXMLStreamReaderCommentEvent  
TestGetXMLStreamReaderGetElementText  
TestGetXMLStreamReaderGetElementTextFromParser  
TestGetXMLStreamReaderGetNamespaceContext  
TestGetXMLStreamReaderNextTag  
TestGetXMLStreamReaderOnNonRootElement  
TestGetXMLStreamReaderWithNamespaceURIInterning Tests the behavior of OMContainer.getXMLStreamReader(boolean, OMXMLStreamReaderConfiguration) with OMXMLStreamReaderConfiguration.isNamespaceURIInterning() set to true.
TestGetXMLStreamReaderWithOMSourcedElementDescendant  
TestGetXMLStreamReaderWithoutCachingPartiallyBuilt Tests that OMContainer.getXMLStreamReaderWithoutCaching() correctly generated events for an element that has been partially built.
TestGetXMLStreamReaderWithPreserveNamespaceContext Tests the behavior of OMContainer.getXMLStreamReader(boolean, OMXMLStreamReaderConfiguration) with OMXMLStreamReaderConfiguration.isPreserveNamespaceContext() set to true.
TestIsCompleteAfterAddingIncompleteChild Tests that the completeness status (as returned by OMSerializable.isComplete()) is updated correctly after an incomplete child is added to a programmatically created element.
TestMultipleDefaultNS  
TestRemoveAttribute Tests the behavior of OMElement.removeAttribute(OMAttribute).
TestRemoveAttributeNotOwner Tests the behavior of OMElement.removeAttribute(OMAttribute) if the given attribute is not owned by the element.
TestRemoveChildren Tests OMContainer.removeChildren() on an OMElement.
TestResolveQNameWithDefaultNamespace  
TestResolveQNameWithNonDefaultNamespace  
TestResolveQNameWithoutNamespace  
TestResolveQNameWithUnboundPrefix Tests the behavior of OMElement.resolveQName(String) if the prefix of the QName is not bound in the namespace context of the element.
TestSerialization Tests proper serialization for different combinations of namespaces on the element and its children.
TestSerializationWithTwoNonBuiltOMElements Regression test for AXIOM-65.
TestSerializeAndConsumePartiallyBuilt Tests that OMElement.serializeAndConsume(java.io.Writer) correctly serializes an object model tree that has been partially built.
TestSerializeAndConsumeWithIncompleteDescendant Tests that OMElement.serializeAndConsume(java.io.Writer) consumes incomplete descendants, even if the element itself is complete (more precisely, created programmatically).
TestSetNamespace Tests the behavior of OMElement.setNamespace(OMNamespace) if no matching namespace binding is in scope.
TestSetNamespaceInvalid Tests the behavior of OMElement.setNamespace(OMNamespace) when the argument binds a prefix to the empty namespace name.
TestSetNamespaceWithMatchingBindingInScope Tests the behavior of OMElement.setNamespace(OMNamespace) if a matching namespace binding is in scope.
TestSetNamespaceWithNullOMNamespace Tests the behavior of OMElement.setNamespace(OMNamespace) if the OMNamespace parameter is null.
TestSetNamespaceWithNullPrefix Tests the behavior of OMElement.setNamespace(OMNamespace) if the OMNamespace object has a null prefix.
TestSetText Tests the behavior of OMElement.setText(String) when invoked on an empty element.
TestSetTextEmptyString Tests the behavior of OMElement.setText(String) when invoked with an empty string as parameter.
TestSetTextNull Tests the behavior of OMElement.setText(String) when invoked with a null parameter.
TestSetTextQName Tests the behavior of OMElement.setText(QName), in particular that it adds a namespace declaration if necessary.
TestSetTextQNameNull Tests the behavior of OMElement.setText(String) when invoked with a null parameter.
TestSetTextQNameWithEmptyPrefix Tests the behavior of OMElement.setText(QName) if the QName has a namespace URI but an empty prefix.
TestSetTextQNameWithExistingChildren Tests the behavior of OMElement.setText(QName) when invoked on an element that has children.
TestSetTextQNameWithoutNamespace Tests the behavior of OMElement.setText(QName) if the QName has no namespace.
TestSetTextWithExistingChildren Tests the behavior of OMElement.setText(String) when invoked on an element that has children.
TestUndeclarePrefix  
TestWriteTextTo Tests the behavior of OMElement.writeTextTo(Writer, boolean) in the simple case with a single OMText child.
TestWriteTextToWithNonTextNodes  
 



Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.