|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
gate.xml.TestXml
public class TestXml
Test class for XML facilities
| Field Summary | |
|---|---|
private static boolean |
DEBUG
Debug flag |
private static String |
workingEncoding
The encoding used in our tests |
| Constructor Summary | |
|---|---|
TestXml(String name)
Construction |
|
| Method Summary | |
|---|---|
private Map |
addAnnotSet2Map(AnnotationSet annotSet,
Map id2AnnMap)
|
private Map |
buildID2AnnotMap(Document aDoc)
Scans a target Doc for all Annotations and builds a map (from anot ID to annot) in the process I also checks to see if there are two annotations with the same ID. |
private Map |
buildMatchesMap(Document doc)
Builds a Map based on the matches feature of some annotations. |
private void |
compareAnnot(Annotation origAnn,
Annotation reloadedAnnot)
Thes if two annotatiosn are the same, except their features. |
private void |
helperBuildMatchesMap(AnnotationSet sourceAnnotSet,
Map aMap)
This is a helper metod. |
private void |
runCompleteTestWithAFormat(URL url,
String urlDescription)
|
void |
setUp()
Fixture set up |
static junit.framework.Test |
suite()
Test suite routine for the test runner |
void |
testAnnotationConsistencyForSaveAsXml()
|
void |
testGateDocumentToAndFromXmlWithDifferentKindOfFormats()
|
void |
testUnpackMarkup()
A test |
protected void |
verifyAnnotationIDGenerator(Document aDoc)
This method tests if the generator for new Annotation IDs is greather than the maximum Annotation ID present in the GATE document. |
private void |
verifyIDConsistency(Map origAnnotMap,
Map reloadedAnnMap)
Verifies if the two maps hold annotations with the same ID. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final boolean DEBUG
private static String workingEncoding
| Constructor Detail |
|---|
public TestXml(String name)
| Method Detail |
|---|
public void setUp()
setUp in class junit.framework.TestCase
public void testGateDocumentToAndFromXmlWithDifferentKindOfFormats()
throws Exception
Exception
private void runCompleteTestWithAFormat(URL url,
String urlDescription)
throws Exception
Exception
public void testUnpackMarkup()
throws Exception
Exception
public void testAnnotationConsistencyForSaveAsXml()
throws Exception
Exceptionprivate Map buildMatchesMap(Document doc)
doc - The document of which annotations will be used to construct the map
private void helperBuildMatchesMap(AnnotationSet sourceAnnotSet,
Map aMap)
sourceAnnotSet - The annotation set investigatedaMap - protected void verifyAnnotationIDGenerator(Document aDoc)
aDoc - The GATE document being tested
private void verifyIDConsistency(Map origAnnotMap,
Map reloadedAnnMap)
origAnnotMap - A map by ID, containing the original annotationsreloadedAnnMap - A map by ID, containing the recreated annotations
private void compareAnnot(Annotation origAnn,
Annotation reloadedAnnot)
origAnn - reloadedAnnot -
private Map addAnnotSet2Map(AnnotationSet annotSet,
Map id2AnnMap)
private Map buildID2AnnotMap(Document aDoc)
aDoc - The GATE doc to be scaned
public static junit.framework.Test suite()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||