org.jdom.test.cases
Class TestVerifier

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jdom.test.cases.TestVerifier
All Implemented Interfaces:
junit.framework.Test

public final class TestVerifier
extends junit.framework.TestCase


Constructor Summary
TestVerifier(java.lang.String name)
          Construct a new instance.
 
Method Summary
static void main(java.lang.String[] args)
          The main method runs all the tests in the text ui
 void setUp()
          This method is called before a test is executed.
static junit.framework.Test suite()
          The suite method runs all the tests
 void tearDown()
          This method is called after a test is executed.
 void test_Namespace_Attribute_collision()
           
 void test_TCM__String_checkAttributeName_String()
          Test for a valid Attribute name.
 void test_TCM__String_checkCDATASection_String()
          Test that checkCDATASection verifies CDATA excluding the closing delimiter.
 void test_TCM__String_checkCharacterData_String()
          Test that a String contains only xml characters.
 void test_TCM__String_checkCommentData_String()
          Test checkCommentData such that a comment is validated as an xml comment consisting of xml characters with the following caveats.
 void test_TCM__String_checkElementName_String()
          Test checkElementName such that a name is validated as an xml name with the following caveats.
 void test_TCM__String_checkNamespacePrefix_String()
          Test that checkNamespacePrefix validates against xml names with the following exceptions.
 void test_TCM__String_checkNamespaceURI_String()
          Tests that checkNamespaceURI validates xml uri's.
 void test_TCM__String_checkProcessingInstructionTarget_String()
          Test that checkProcessintInstructionTarget validates the name of a processing instruction.
 void test_TCM__void_main_ArrayString()
          This test is a noop.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

TestVerifier

public TestVerifier(java.lang.String name)
Construct a new instance.

Method Detail

main

public static void main(java.lang.String[] args)
The main method runs all the tests in the text ui


setUp

public void setUp()
           throws java.io.IOException,
                  org.jdom.JDOMException
This method is called before a test is executed.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.io.IOException
org.jdom.JDOMException

suite

public static junit.framework.Test suite()
The suite method runs all the tests


tearDown

public void tearDown()
This method is called after a test is executed.

Overrides:
tearDown in class junit.framework.TestCase

test_TCM__String_checkAttributeName_String

public void test_TCM__String_checkAttributeName_String()
Test for a valid Attribute name. A valid Attribute name is an xml name (xml start character + xml name characters) with some special considerations. "xml:lang" and "xml:space" are allowed. No ':' are allowed since prefixes are defined with Namespace objects. The name must not be "xmlns"


test_TCM__String_checkCDATASection_String

public void test_TCM__String_checkCDATASection_String()
Test that checkCDATASection verifies CDATA excluding the closing delimiter.


test_TCM__String_checkCharacterData_String

public void test_TCM__String_checkCharacterData_String()
Test that a String contains only xml characters. The method under only checks for null values and then character by character scans the string so this test is not exhaustive


test_TCM__String_checkCommentData_String

public void test_TCM__String_checkCommentData_String()
Test checkCommentData such that a comment is validated as an xml comment consisting of xml characters with the following caveats. The comment must not contain a double hyphen.


test_TCM__String_checkElementName_String

public void test_TCM__String_checkElementName_String()
Test checkElementName such that a name is validated as an xml name with the following caveats. The name must not start with "-" or ":".


test_TCM__String_checkNamespacePrefix_String

public void test_TCM__String_checkNamespacePrefix_String()
Test that checkNamespacePrefix validates against xml names with the following exceptions. Prefix names must not start with "-", "xmlns", digits, "$", or "." and must not contain ":"


test_TCM__String_checkNamespaceURI_String

public void test_TCM__String_checkNamespaceURI_String()
Tests that checkNamespaceURI validates xml uri's. A valid URI is alphanumeric characters and the reserved characters: ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," The URI cannot begin with a digit, "-" or "$". It must have at least one ":" separating the scheme from the scheme specific part XXX:TODO make this match the eventual specs for the Verifier class which is incomplete


test_TCM__String_checkProcessingInstructionTarget_String

public void test_TCM__String_checkProcessingInstructionTarget_String()
Test that checkProcessintInstructionTarget validates the name of a processing instruction. This name must be a normal xml and cannot have ":" or "xml" in the name.


test_Namespace_Attribute_collision

public void test_Namespace_Attribute_collision()

test_TCM__void_main_ArrayString

public void test_TCM__void_main_ArrayString()
This test is a noop. The method is for development only It will remain in the suite until it is removed from the Verifier class



Copyright © 2007 Brett McLaughlin, Jason Hunter. All Rights Reserved.