gate.annotation
Class TestAnnotation

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bygate.annotation.TestAnnotation
All Implemented Interfaces:
junit.framework.Test

public class TestAnnotation
extends junit.framework.TestCase

Tests for the Annotation classes


Field Summary
protected  AnnotationSet basicAS
          An annotation set
private static boolean DEBUG
          Debug flag
protected  Document doc1
          A document
protected  FeatureMap emptyFeatureMap
          An empty feature map
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestAnnotation(String name)
          Construction
 
Method Summary
 void _testGap()
          Test get with offset and no annotation starting at given offset
static void main(String[] args)
           
 void setUp()
          Fixture set up
static junit.framework.Test suite()
          Test suite routine for the test runner
 void testAddWithNodes()
          Test the annotations set add method that uses existing nodes
 void testAnnotationSet()
          Test AnnotationSetImpl
 void testComplexGet()
          Test complex get (with type, offset and feature contraints)
 void testExceptions()
          Test exception throwing
 void testFeatureSubsumeMethods()
           
 void testIsPartiallyCompatibleAndCompatible()
          Test Coextensive
 void testIterator()
          Test iterator
 void testIteratorRemove()
          Test iterator remove
 void testOffsetIndex()
          Test indexing by offset
 void testOverlapsAndCoextensive()
          Test Overlaps
 void testRemove()
          Test remove
 void testRemoveInexistant()
           
 void testSetMethods()
          Test Set methods
 void testTypeIndex()
          Test type index
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

See Also:
Constant Field Values

doc1

protected Document doc1
A document


basicAS

protected AnnotationSet basicAS
An annotation set


emptyFeatureMap

protected FeatureMap emptyFeatureMap
An empty feature map

Constructor Detail

TestAnnotation

public TestAnnotation(String name)
Construction

Method Detail

setUp

public void setUp()
           throws Exception
Fixture set up

Throws:
Exception

testOffsetIndex

public void testOffsetIndex()
                     throws InvalidOffsetException
Test indexing by offset

Throws:
InvalidOffsetException

testExceptions

public void testExceptions()
Test exception throwing


testTypeIndex

public void testTypeIndex()
                   throws Exception
Test type index

Throws:
Exception

testAddWithNodes

public void testAddWithNodes()
                      throws Exception
Test the annotations set add method that uses existing nodes

Throws:
Exception

testComplexGet

public void testComplexGet()
                    throws InvalidOffsetException
Test complex get (with type, offset and feature contraints)

Throws:
InvalidOffsetException

testRemove

public void testRemove()
Test remove


testRemoveInexistant

public void testRemoveInexistant()
                          throws Exception
Throws:
Exception

testIteratorRemove

public void testIteratorRemove()
Test iterator remove


testIterator

public void testIterator()
Test iterator


testSetMethods

public void testSetMethods()
Test Set methods


testAnnotationSet

public void testAnnotationSet()
                       throws Exception
Test AnnotationSetImpl

Throws:
Exception

suite

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


_testGap

public void _testGap()
              throws InvalidOffsetException
Test get with offset and no annotation starting at given offset

Throws:
InvalidOffsetException

testOverlapsAndCoextensive

public void testOverlapsAndCoextensive()
                                throws InvalidOffsetException
Test Overlaps

Throws:
InvalidOffsetException

testIsPartiallyCompatibleAndCompatible

public void testIsPartiallyCompatibleAndCompatible()
                                            throws InvalidOffsetException
Test Coextensive

Throws:
InvalidOffsetException

testFeatureSubsumeMethods

public void testFeatureSubsumeMethods()

main

public static void main(String[] args)