Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.jxpath.ri.model
Class XMLModelTestCase  view XMLModelTestCase download XMLModelTestCase.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.jxpath.JXPathTestCase
              extended byorg.apache.commons.jxpath.ri.model.XMLModelTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class XMLModelTestCase
extends org.apache.commons.jxpath.JXPathTestCase

Abstract superclass for pure XPath 1.0. Subclasses apply the same XPaths to contexts using different models: DOM, JDOM etc.

Version:
$Revision: 1.23 $ $Date: 2004/06/30 00:29:13 $

Field Summary
protected  org.apache.commons.jxpath.JXPathContext context
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
XMLModelTestCase(java.lang.String name)
          Construct a new instance of this test case.
 
Method Summary
protected  void assertXMLSignature(org.apache.commons.jxpath.JXPathContext context, java.lang.String path, java.lang.String signature, boolean elements, boolean attributes, boolean text, boolean pi)
           
protected  org.apache.commons.jxpath.JXPathContext createContext()
           
protected  org.apache.commons.jxpath.xml.DocumentContainer createDocumentContainer()
           
protected abstract  org.apache.commons.jxpath.AbstractFactory getAbstractFactory()
           
protected abstract  java.lang.String getModel()
           
protected abstract  java.lang.String getXMLSignature(java.lang.Object node, boolean elements, boolean attributes, boolean text, boolean pi)
          An XML signature is used to determine if we have the right result after a modification of XML by JXPath.
 void setUp()
          Sets up the fixture, for example, open a network connection.
 void testAxisAncestor()
           
 void testAxisAncestorOrSelf()
           
 void testAxisAttribute()
           
 void testAxisChild()
           
 void testAxisChildIndexPredicate()
           
 void testAxisDescendant()
           
 void testAxisFollowing()
           
 void testAxisFollowingSibling()
           
 void testAxisNamespace()
           
 void testAxisParent()
           
 void testAxisPrecedingSibling()
           
 void testAxisSelf()
           
 void testBooleanFunction()
           
 void testContainer()
           
 void testCreatePath()
          Test JXPathContext.createPath() with various arguments
 void testCreatePathAndSetValue()
          Test JXPath.createPathAndSetValue() with various arguments
 void testDocument()
           
 void testDocumentOrder()
           
 void testElementInVariable()
           
 void testFunctionsLastAndPosition()
           
 void testID()
           
 void testLang()
           
 void testNamespaceMapping()
           
 void testNodeTypeComment()
           
 void testNodeTypeProcessingInstruction()
           
 void testNodeTypeText()
           
 void testRemovePath()
          Test JXPathContext.removePath() with various arguments
 void testSetValue()
           
 void testTypeConversions()
           
 
Methods inherited from class org.apache.commons.jxpath.JXPathTestCase
assertDocumentOrder, assertXPathCreatePath, assertXPathCreatePathAndSetValue, assertXPathNodeType, assertXPathPointer, assertXPathPointerIterator, assertXPathPointerLenient, assertXPathSetValue, assertXPathSetValue, assertXPathValue, assertXPathValue, assertXPathValueAndPointer, assertXPathValueIterator, assertXPathValueLenient, assertXPathValueType, list, list, list, list, list, list, list, list, set, set, set, set, set
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

protected org.apache.commons.jxpath.JXPathContext context
Constructor Detail

XMLModelTestCase

public XMLModelTestCase(java.lang.String name)
Construct a new instance of this test case.

Method Detail

setUp

public void setUp()
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


getModel

protected abstract java.lang.String getModel()

createDocumentContainer

protected org.apache.commons.jxpath.xml.DocumentContainer createDocumentContainer()

getAbstractFactory

protected abstract org.apache.commons.jxpath.AbstractFactory getAbstractFactory()

createContext

protected org.apache.commons.jxpath.JXPathContext createContext()

getXMLSignature

protected abstract java.lang.String getXMLSignature(java.lang.Object node,
                                                    boolean elements,
                                                    boolean attributes,
                                                    boolean text,
                                                    boolean pi)
An XML signature is used to determine if we have the right result after a modification of XML by JXPath. It is basically a piece of simplified XML.


assertXMLSignature

protected void assertXMLSignature(org.apache.commons.jxpath.JXPathContext context,
                                  java.lang.String path,
                                  java.lang.String signature,
                                  boolean elements,
                                  boolean attributes,
                                  boolean text,
                                  boolean pi)

testDocumentOrder

public void testDocumentOrder()

testSetValue

public void testSetValue()

testCreatePath

public void testCreatePath()
Test JXPathContext.createPath() with various arguments


testCreatePathAndSetValue

public void testCreatePathAndSetValue()
Test JXPath.createPathAndSetValue() with various arguments


testRemovePath

public void testRemovePath()
Test JXPathContext.removePath() with various arguments


testID

public void testID()

testAxisChild

public void testAxisChild()

testAxisChildIndexPredicate

public void testAxisChildIndexPredicate()

testAxisDescendant

public void testAxisDescendant()

testAxisParent

public void testAxisParent()

testAxisFollowingSibling

public void testAxisFollowingSibling()

testAxisPrecedingSibling

public void testAxisPrecedingSibling()

testAxisAttribute

public void testAxisAttribute()

testAxisNamespace

public void testAxisNamespace()

testAxisAncestor

public void testAxisAncestor()

testAxisAncestorOrSelf

public void testAxisAncestorOrSelf()

testAxisFollowing

public void testAxisFollowing()

testAxisSelf

public void testAxisSelf()

testNodeTypeComment

public void testNodeTypeComment()

testNodeTypeText

public void testNodeTypeText()

testNodeTypeProcessingInstruction

public void testNodeTypeProcessingInstruction()

testLang

public void testLang()

testDocument

public void testDocument()

testContainer

public void testContainer()

testElementInVariable

public void testElementInVariable()

testTypeConversions

public void testTypeConversions()

testBooleanFunction

public void testBooleanFunction()

testFunctionsLastAndPosition

public void testFunctionsLastAndPosition()

testNamespaceMapping

public void testNamespaceMapping()