gate.util
Class TestEqual

java.lang.Object
  extended by gate.util.TestEqual

public class TestEqual
extends Object

This class provides some static utility methods such as equality test for annotation sets and documents. They are mainly used by test classes.


Field Summary
static String message
          If set to true, explanation messages will be printed when a test fails.
 
Constructor Summary
TestEqual()
           
 
Method Summary
static boolean annotationSetsEqual(AnnotationSet as1, AnnotationSet as2)
          Two AnnotationSet are equal if their name, the documents of which belong to the AnnotationSets and annotations from the sets are the same
protected static boolean check(Object a, Object b)
          Check: test 2 objects for equality
static boolean documentsEqual(Document doc1, Document doc2)
          Checks two documents for equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

public static String message
If set to true, explanation messages will be printed when a test fails.

Constructor Detail

TestEqual

public TestEqual()
Method Detail

documentsEqual

public static boolean documentsEqual(Document doc1,
                                     Document doc2)
Checks two documents for equality.

Parameters:
doc1 - a document
doc2 - another document
Returns:
a boolean.

annotationSetsEqual

public static boolean annotationSetsEqual(AnnotationSet as1,
                                          AnnotationSet as2)
Two AnnotationSet are equal if their name, the documents of which belong to the AnnotationSets and annotations from the sets are the same


check

protected static boolean check(Object a,
                               Object b)
Check: test 2 objects for equality