gate.corpora
Class TestDocument

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by gate.corpora.TestDocument
All Implemented Interfaces:
junit.framework.Test

public class TestDocument
extends junit.framework.TestCase

Tests for the Document classes


Field Summary
protected  String testDocument1
          Name of test document 1
protected static String testServer
          Base of the test server URL
 
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 testDocRender()
           
 void testExplicitMimeType()
          Test to verify behaviour of the mimeType init parameter.
 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, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Throws:
Exception

testOriginalContentPreserving

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

Throws:
Exception

testLotsOfThings

public void testLotsOfThings()
A comprehensive test


testDocRender

public void testDocRender()
                   throws Exception
Throws:
Exception

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.

Throws:
Exception

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.
Throws:
Exception

testExplicitMimeType

public void testExplicitMimeType()
                          throws Exception
Test to verify behaviour of the mimeType init parameter.

Throws:
Exception

suite

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