org.apache.axiom.ts.om.OMTestSuiteBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of axiom-testsuite Show documentation
Show all versions of axiom-testsuite Show documentation
The Axiom implementation test suite. This test suite can be used to check conformance of a
particular Axiom implementation.
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axiom.ts.om;
import static org.apache.axiom.testing.multiton.Multiton.getInstances;
import java.lang.reflect.Method;
import javax.xml.namespace.QName;
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.testing.multiton.Multiton;
import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
import org.apache.axiom.ts.dimension.AddAttributeStrategy;
import org.apache.axiom.ts.dimension.BuilderFactory;
import org.apache.axiom.ts.dimension.ElementContext;
import org.apache.axiom.ts.dimension.ExpansionStrategy;
import org.apache.axiom.ts.dimension.NoNamespaceStrategy;
import org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
import org.apache.axiom.ts.jaxp.DOMImplementation;
import org.apache.axiom.ts.jaxp.SAXImplementation;
import org.apache.axiom.ts.jaxp.XSLTImplementation;
import org.apache.axiom.ts.om.container.OMContainerExtractor;
import org.apache.axiom.ts.om.container.OMContainerFactory;
import org.apache.axiom.ts.om.factory.CreateOMElementParentSupplier;
import org.apache.axiom.ts.om.factory.CreateOMElementVariant;
import org.apache.axiom.ts.om.sourcedelement.OMSourcedElementVariant;
import org.apache.axiom.ts.om.sourcedelement.push.PushOMDataSourceScenario;
import org.apache.axiom.ts.om.xpath.AXIOMXPathTestCase;
import org.apache.axiom.ts.om.xpath.TestAXIOMXPath;
import org.apache.axiom.ts.xml.StreamType;
import org.apache.axiom.ts.xml.XMLSample;
public class OMTestSuiteBuilder extends MatrixTestSuiteBuilder {
private static final QName[] qnames = {
new QName("root"),
new QName("urn:test", "root", "p"),
new QName("urn:test", "root") };
private final OMMetaFactory metaFactory;
public OMTestSuiteBuilder(OMMetaFactory metaFactory) {
this.metaFactory = metaFactory;
}
protected void addTests() {
addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetAttributeTypeDefault(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetNamespaceNormalized(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetNamespaceURIWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetNamespaceURIWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetPrefixWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetPrefixWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetQNameWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestGetQNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestHasNameWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestHasNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.attribute.TestSetLocalName(metaFactory));
for (int i=0; i<4; i++) {
boolean declare = (i & 1) != 0;
boolean owner = (i & 2) != 0;
// Valid
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", "p", declare, owner, null, false, "p", declare && owner));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", null, declare, owner, null, false, null, declare && owner));
if (owner) {
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", "p", declare, true, "p", false, "p", false));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", "p", declare, true, "q", false, "p", declare));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", null, declare, true, "p", false, "p", false));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", null, declare, true, "", false, null, declare));
}
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "", "", declare, owner, null, false, "", false));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "", null, declare, owner, null, false, "", false));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, null, null, declare, owner, null, false, "", false));
// Invalid
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "urn:test", "", declare, owner, null, true, null, false));
addTest(new org.apache.axiom.ts.om.attribute.TestSetNamespace(metaFactory, "", "p", declare, owner, null, true, null, false));
}
for (StreamType streamType : Multiton.getInstances(StreamType.class)) {
addTest(new org.apache.axiom.ts.om.builder.TestCloseWithStream(metaFactory, streamType));
}
addTest(new org.apache.axiom.ts.om.builder.TestCloseWithSystemId(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestCloseWithXMLStreamReader(metaFactory));
for (XMLSample file : getInstances(XMLSample.class)) {
for (DOMImplementation implementation : getInstances(DOMImplementation.class)) {
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOM(metaFactory, file, implementation, Boolean.TRUE));
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOM(metaFactory, file, implementation, Boolean.FALSE));
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOM(metaFactory, file, implementation, null));
}
for (SAXImplementation implementation : getInstances(SAXImplementation.class)) {
if (!file.hasExternalSubset() || implementation.reportsExternalSubsetEntity()) {
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromSAXSource(metaFactory, file, implementation, Boolean.TRUE));
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromSAXSource(metaFactory, file, implementation, Boolean.FALSE));
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromSAXSource(metaFactory, file, implementation, null));
}
}
}
addTest(new org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOMElement(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestCreateStAXOMBuilderFromFragment(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestCreateStAXOMBuilderIncorrectState(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestCreateStAXOMBuilderNamespaceRepairing(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestCreateStAXOMBuilderNamespaceRepairing2(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestDetachWithDOM(metaFactory, false));
addTest(new org.apache.axiom.ts.om.builder.TestDetachWithDOM(metaFactory, true));
for (StreamType streamType : Multiton.getInstances(StreamType.class)) {
addTest(new org.apache.axiom.ts.om.builder.TestDetachWithStream(metaFactory, streamType, false));
addTest(new org.apache.axiom.ts.om.builder.TestDetachWithStream(metaFactory, streamType, true));
}
addTest(new org.apache.axiom.ts.om.builder.TestDetachWithSAXSource(metaFactory));
for (BuilderFactory bf : getInstances(BuilderFactory.class)) {
addTest(new org.apache.axiom.ts.om.builder.TestGetDocumentElement(metaFactory, bf, null));
addTest(new org.apache.axiom.ts.om.builder.TestGetDocumentElement(metaFactory, bf, Boolean.FALSE));
addTest(new org.apache.axiom.ts.om.builder.TestGetDocumentElement(metaFactory, bf, Boolean.TRUE));
}
addTest(new org.apache.axiom.ts.om.builder.TestGetDocumentElementWithDiscardDocumentIllFormedEpilog(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestGetDocumentElementWithIllFormedDocument(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestInvalidXML(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestIOExceptionInGetText(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestMalformedDocument(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestNextBeforeGetDocumentElement(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestReadAttachmentBeforeRootPartComplete(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestRegisterCustomBuilderForPayloadJAXBPlain(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestRegisterCustomBuilderForPayloadJAXBWithDataHandlerReaderExtension(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestRegisterCustomBuilderForPayloadJAXBWithXOP(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestRootPartStreaming(metaFactory));
addTest(new org.apache.axiom.ts.om.builder.TestStandaloneConfiguration(metaFactory));
addTest(new org.apache.axiom.ts.om.comment.TestSerialize(metaFactory));
for (XMLSample file : getInstances(XMLSample.class)) {
for (OMContainerExtractor ce : getInstances(OMContainerExtractor.class)) {
for (BuilderFactory bf : getInstances(BuilderFactory.class)) {
addTest(new org.apache.axiom.ts.om.container.TestGetXMLStreamReader(metaFactory, file, bf, ce, true));
addTest(new org.apache.axiom.ts.om.container.TestGetXMLStreamReader(metaFactory, file, bf, ce, false));
}
// On a document containing entity references, serialization tests will only work correctly if
// the entire document is serialized (so that the DTD is available)
if (!file.hasEntityReferences() || ce == OMContainerExtractor.DOCUMENT) {
for (SerializationStrategy ss : getInstances(SerializationStrategy.class)) {
if (ss.supportsInternalSubset() || !file.hasInternalSubset()) {
addTest(new org.apache.axiom.ts.om.container.TestSerialize(metaFactory, file, ce, ss));
}
}
}
}
}
for (OMContainerFactory cf : getInstances(OMContainerFactory.class)) {
addTest(new org.apache.axiom.ts.om.container.TestAddChildWithIncompleteSibling(metaFactory, cf));
addTest(new org.apache.axiom.ts.om.container.TestGetDescendants(metaFactory, cf, true));
addTest(new org.apache.axiom.ts.om.container.TestGetDescendants(metaFactory, cf, false));
}
addTest(new org.apache.axiom.ts.om.doctype.TestSerialize(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestAddChildIncomplete(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestAddChildWithExistingDocumentElement(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestBuild(metaFactory));
for (XMLSample file : getInstances(XMLSample.class)) {
addTest(new org.apache.axiom.ts.om.document.TestClone(metaFactory, file));
}
addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest1.xml", "MD5", "3e5d68c6607bc56c9c171560e4f19db9"));
addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest2.xml", "SHA1", "3c47a807517d867d42ffacb2d3e9da81895d5aac"));
addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest3.xml", "SHA", "41466144c1cab4234fb127cfb8cf92f9"));
addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest4.xml", "SHA", "be3b0836cd6f0ceacdf3d40b49a0468d03d2ba2e"));
addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElement(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementAfterDetach(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementWithParser(metaFactory));
for (XSLTImplementation xsltImplementation : getInstances(XSLTImplementation.class)) {
if (xsltImplementation.supportsLexicalHandlerWithStreamSource()) {
for (XMLSample file : getInstances(XMLSample.class)) {
addTest(new org.apache.axiom.ts.om.document.TestGetSAXResult(metaFactory, xsltImplementation, file));
}
}
}
for (SAXImplementation saxImplementation : getInstances(SAXImplementation.class)) {
for (XMLSample file : getInstances(XMLSample.class)) {
if (!file.hasExternalSubset() || saxImplementation.reportsExternalSubsetEntity()) {
addTest(new org.apache.axiom.ts.om.document.TestGetSAXResultSAXParser(metaFactory, saxImplementation, file));
}
}
}
addTest(new org.apache.axiom.ts.om.document.TestGetSAXResultJAXB(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestGetSAXResultXMLBeans(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestIsCompleteAfterAddingIncompleteChild(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, true, false));
addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, true, true));
addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, false, false));
addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, false, true));
addTest(new org.apache.axiom.ts.om.document.TestSerializeAndConsume(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestSerializeAndConsumeWithIncompleteDescendant(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestSetOMDocumentElementNew(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestSetOMDocumentElementNull(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestSetOMDocumentElementReplace(metaFactory));
addTest(new org.apache.axiom.ts.om.document.TestSetOMDocumentElementReplaceSame(metaFactory));
addTest(new org.apache.axiom.ts.om.document.sr.TestCharacterDataReaderFromParser(metaFactory, true));
addTest(new org.apache.axiom.ts.om.document.sr.TestCharacterDataReaderFromParser(metaFactory, false));
addTest(new org.apache.axiom.ts.om.document.sr.TestCloseWithoutCaching(metaFactory));
addTest(new org.apache.axiom.ts.om.document.sr.TestDTDReader(metaFactory));
addTest(new org.apache.axiom.ts.om.document.sr.TestDTDReaderFromParser(metaFactory, false, true));
addTest(new org.apache.axiom.ts.om.document.sr.TestDTDReaderFromParser(metaFactory, true, true));
addTest(new org.apache.axiom.ts.om.document.sr.TestDTDReaderFromParser(metaFactory, false, false));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeAlreadyOwnedByElement(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeAlreadyOwnedByOtherElement(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeGeneratedPrefix(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeGeneratedPrefix(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeReuseExistingPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithInvalidNamespace1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithInvalidNamespace2(metaFactory));
for (AddAttributeStrategy strategy : getInstances(AddAttributeStrategy.class)) {
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeMultiple(metaFactory, strategy));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeReplace(metaFactory, strategy));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithExistingNamespaceDeclarationInScope(metaFactory, strategy));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithExistingNamespaceDeclarationOnSameElement(metaFactory, strategy));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithMaskedNamespaceDeclaration(metaFactory, strategy));
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithoutExistingNamespaceDeclaration(metaFactory, strategy));
for (NoNamespaceStrategy noNamespaceStrategy : getInstances(NoNamespaceStrategy.class)) {
addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithoutNamespace(metaFactory, strategy, noNamespaceStrategy));
}
}
addTest(new org.apache.axiom.ts.om.element.TestAddChild(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddChild2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddChildDiscarded(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddChildIncomplete(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddChildWithParent(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestAddChildWithSameParent(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestAddChildWithSameParent(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestBuildDiscarded(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringGrandParentsDefaultNSWithPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringParentsDefaultNSWithPrefix(metaFactory));
for (XMLSample file : getInstances(XMLSample.class)) {
if (!file.hasEntityReferences()) {
addTest(new org.apache.axiom.ts.om.element.TestCloneOMElement2(metaFactory, file));
}
}
addTest(new org.apache.axiom.ts.om.element.TestCloneOMElementNamespaceRepairing(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareDefaultNamespace1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareDefaultNamespace2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareDefaultNamespaceConflict1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareDefaultNamespaceConflict2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespace1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceInvalid1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceInvalid2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceWithGeneratedPrefix1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceWithGeneratedPrefix2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceWithGeneratedPrefix3(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDetachWithDifferentBuilder(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDigestWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDigestWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDiscardDocumentElement(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDiscardIncomplete(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestDiscardPartiallyBuilt(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestFindNamespaceByNamespaceURIMasked(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestFindNamespaceByPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestFindNamespaceCaseSensitivity(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestFindNamespaceURIWithPrefixUndeclaring(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAllAttributes1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAllAttributes2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAllDeclaredNamespaces(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAllDeclaredNamespacesNoSuchElementException(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAllDeclaredNamespacesRemove(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAttributeValueNonExisting(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAttributeValueWithXmlPrefix1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAttributeValueWithXmlPrefix2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAttributeWithXmlPrefix1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetAttributeWithXmlPrefix2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildElements(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildElementsConcurrentModification(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildElementsConsumed(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildren(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenConcurrentModification(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenRemove1(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenRemove2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenRemove3(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenRemove4(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithLocalName(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithName(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithName2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithName3(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithName4(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithNameNextWithoutHasNext(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetChildrenWithNamespaceURI(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetDefaultNamespace2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetDescendants(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestGetDescendants(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestGetFirstChildWithName(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetFirstChildWithNameOnIncompleteElement(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetFirstOMChildAfterConsume(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetFirstOMChildAfterDiscard(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceContext(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceContext(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceNormalized(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceNormalized(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceNormalizedWithParser(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceNormalizedWithSAXSource(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespacesInScope(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespacesInScopeWithDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespacesInScopeWithMaskedDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespacesInScopeWithMaskedNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceURIWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetNamespaceURIWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetPrefixWithDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetPrefixWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetPrefixWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetQNameWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetQNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetSAXResultWithDTD(metaFactory));
for (XSLTImplementation xsltImplementation : getInstances(XSLTImplementation.class)) {
addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransform(metaFactory, xsltImplementation, true));
addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransform(metaFactory, xsltImplementation, false));
addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransformOnFragment(metaFactory, xsltImplementation, true));
addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransformOnFragment(metaFactory, xsltImplementation, false));
}
addTest(new org.apache.axiom.ts.om.element.TestGetText(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsQName(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsQNameEmpty(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsQNameNoNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsQNameWithExtraWhitespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsStreamWithNonTextChildren(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsStreamWithoutCaching(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextAsStreamWithSingleTextNode(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextBinary(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextWithCDATASectionChild(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetTextWithMixedOMTextChildren(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderCDATAEventFromElement(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderCDATAEventFromParser(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElement(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElement(metaFactory, false));
for (int build=0; build<5; build++) {
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElementPartiallyBuilt(metaFactory, true, build));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElementPartiallyBuilt(metaFactory, false, build));
}
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithCaching(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithNamespaceURIInterning(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithoutCachingPartiallyBuilt(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithoutCachingPartiallyBuiltModified(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithPreserveNamespaceContext(metaFactory, true, true));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithPreserveNamespaceContext(metaFactory, true, false));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithPreserveNamespaceContext(metaFactory, false, true));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithPreserveNamespaceContext(metaFactory, false, false));
addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithPreserveNamespaceContext2(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestHasNameWithNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestHasNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestIsCompleteAfterAddingIncompleteChild(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestIsCompleteWithParser(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestMultipleDefaultNS(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestRemoveAttribute(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestRemoveAttributeNotOwner(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestRemoveChildren(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.TestRemoveChildren(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithNonDefaultNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithUnboundPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "D", "D",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "D", "U",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "D", "Q",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "Q", "Q",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "Q", "U",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "Q", "D",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "U", "U",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "U", "Q",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerialization(metaFactory, "U", "D",
"John 34 50 "));
addTest(new org.apache.axiom.ts.om.element.TestSerializationWithTwoNonBuiltOMElements(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSerializeAndConsumeConsumed(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSerializeAndConsumePartiallyBuilt(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSerializeAndConsumeWithIncompleteDescendant(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSerializeWithXmlStreamWriterFilter(metaFactory, (char)0));
addTest(new org.apache.axiom.ts.om.element.TestSerializeWithXmlStreamWriterFilter(metaFactory, (char)0x15));
for (int i=0; i<3; i++) {
Boolean declare = i == 0 ? null : Boolean.valueOf(i==2);
boolean implicitDeclare = declare == null || declare.booleanValue();
// Valid
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", "p", declare, null, false, "p", implicitDeclare));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", null, declare, null, false, null, implicitDeclare));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", "p", declare, "p", false, "p", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", "p", declare, "q", false, "p", implicitDeclare));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", null, declare, "p", false, "p", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", null, declare, "", false, "", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", "", declare, null, false, "", implicitDeclare));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "urn:test", "", declare, "", false, "", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "", "", declare, null, false, "", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "", null, declare, null, false, "", false));
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, null, null, declare, null, false, "", false));
// Invalid
addTest(new org.apache.axiom.ts.om.element.TestSetNamespace(metaFactory, "", "p", declare, null, true, null, false));
}
addTest(new org.apache.axiom.ts.om.element.TestSetText(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextEmptyString(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextNull(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextWithExistingChildren(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextQName(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextQNameNull(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextQNameWithEmptyPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextQNameWithExistingChildren(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestSetTextQNameWithoutNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestUndeclarePrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestWriteTextTo(metaFactory));
addTest(new org.apache.axiom.ts.om.element.TestWriteTextToWithNonTextNodes(metaFactory));
addTest(new org.apache.axiom.ts.om.element.sr.TestClose(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.sr.TestClose(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.sr.TestCloseAndContinueBuilding(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.sr.TestCloseAndContinueBuilding(metaFactory, false));
for (BuilderFactory bf : getInstances(BuilderFactory.class)) {
addTest(new org.apache.axiom.ts.om.element.sr.TestCommentEvent(metaFactory, bf, true));
addTest(new org.apache.axiom.ts.om.element.sr.TestCommentEvent(metaFactory, bf, false));
}
addTest(new org.apache.axiom.ts.om.element.sr.TestGetDataHandlerFromElement(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.sr.TestGetDataHandlerFromElement(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.sr.TestGetElementText(metaFactory));
for (BuilderFactory bf : getInstances(BuilderFactory.class)) {
addTest(new org.apache.axiom.ts.om.element.sr.TestGetElementTextFromParser(metaFactory, bf, true, 0));
for (int build=0; build<6; build++) {
addTest(new org.apache.axiom.ts.om.element.sr.TestGetElementTextFromParser(metaFactory, bf, false, build));
}
}
addTest(new org.apache.axiom.ts.om.element.sr.TestGetNamespaceContext(metaFactory, true));
addTest(new org.apache.axiom.ts.om.element.sr.TestGetNamespaceContext(metaFactory, false));
addTest(new org.apache.axiom.ts.om.element.sr.TestNextTag(metaFactory));
addTest(new org.apache.axiom.ts.om.entref.TestSerialize(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMAttributeGeneratedPrefix(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMAttributeInterfaces(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMAttributeNullPrefixNoNamespace(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMAttributeWithInvalidNamespace1(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMAttributeWithInvalidNamespace2(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMCommentWithoutParent(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMDocTypeWithoutParent(metaFactory));
addTest(new org.apache.axiom.ts.om.factory.TestCreateOMDocument(metaFactory));
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy