gate.corpora
Class TestDocument

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--gate.corpora.TestDocument
All Implemented Interfaces:
junit.framework.Test

public class TestDocument
extends junit.framework.TestCase

Tests for the Document classes


Field Summary
private static boolean DEBUG
          Debug flag
protected  String testDocument1
          Name of test document 1
protected static String testServer
          Base of the test server URL
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
TestDocument(String name)
          Construction
 
Method Summary
static String getTestServerName()
          Get the name of the test server
 void setUp()
          Fixture set up
static junit.framework.Test suite()
          Test suite routine for the test runner
 void testCompareTo()
          Test ordering
 void testLotsOfThings()
          A comprehensive test
 void testOriginalContentPreserving()
          Test loading of the original document content
static void verifyNodeIdConsistency(AnnotationSet annotSet, Map offests2NodeId, Document doc)
          This metod runs the test over an annotation Set.
static void verifyNodeIdConsistency(Document doc)
          The reason this is method begins with verify and not with test is that it gets called by various other test methods.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

testServer

protected static String testServer
Base of the test server URL

testDocument1

protected String testDocument1
Name of test document 1
Constructor Detail

TestDocument

public TestDocument(String name)
Construction
Method Detail

setUp

public void setUp()
Fixture set up
Overrides:
setUp in class junit.framework.TestCase

getTestServerName

public static String getTestServerName()
Get the name of the test server

testCompareTo

public void testCompareTo()
                   throws Exception
Test ordering

testOriginalContentPreserving

public void testOriginalContentPreserving()
                                   throws Exception
Test loading of the original document content

testLotsOfThings

public void testLotsOfThings()
A comprehensive test

verifyNodeIdConsistency

public static void verifyNodeIdConsistency(Document doc)
                                    throws Exception
The reason this is method begins with verify and not with test is that it gets called by various other test methods. It is somehow a utility test method. It should be called on all gate documents having annotation sets.

verifyNodeIdConsistency

public static void verifyNodeIdConsistency(AnnotationSet annotSet,
                                           Map offests2NodeId,
                                           Document doc)
                                    throws Exception
This metod runs the test over an annotation Set. It is called from her older sister. Se above.
Parameters:
annotSet - is the annotation set being tested.
offests2NodeId - is the Map used to test the consistency.
doc - is used in composing the assert error messsage.

suite

public static junit.framework.Test suite()
Test suite routine for the test runner