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


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, getName, name, run, run, runBare, setName, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestDocument

public TestDocument(String name)
Construction
Method Detail

setUp

public void setUp()
Fixture set up

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