Package nzilbb.ag
Class TestGraph
- java.lang.Object
-
- nzilbb.ag.TestGraph
-
public class TestGraph extends Object
Annotation Graph unit tests.
-
-
Constructor Summary
Constructors Constructor Description TestGraph()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotationHierarchy()Ensure traversals and tests of annotation hierarchy.voidassignWordsToUtterances()Ensure assigning words to utterances works as expected.voidbasicAttributes()Test setting/getting of basic graph attributesvoidbasicChangeTracking()Test graph correctly tracks Annotation/Anchor changes.voidbasicObjectInterrelation()Test relationships between graph elements are held.voidbasicSpans()Test span annotation.voidbasicTagging()Test functionality of taggin methodsvoidchangeOrder()Test graph changes are reported in the correct order.voidcompareOffsets1000()Ensure setting offset granularity to 1/1000 works as expected.voidcompareOffsets16000()Ensure setting offset granularity to 1/16000 works as expected.voidconstructionOrder()Ensure order of creation of Anchors/Annotations is unimportant.voidcreateSubdivision()Test annotation subdivision.voideasyAnchorChaining()Ensure addAnnotation() automatically creates new anchors as required.voidextendedAttributes()Test setting/getting of arbitrary attributesvoidfirstAndAll()Test first() and all() function correctly.voidfragmentByAnnotation()Test fragment creation by defining annotation.voidfragmentByBoundingAndAncestorAnnotations()Test fragmnet cretion by bounding anchors and ancestor annotation - i.e. filter by participantvoidfragmentByOffset()Test fragment creation by offset.voidfragmentByUtterance()Test fragment creation by utterance.voidFragmentId()Ensure fragment IDs are correctly generated.voidgetAnchorAt()Test getAnchorAt() works correctly.voidinsertBeforeAfter()Test annotation insertion results in correctly chaining.static voidmain(String[] args)voidorderOfAnnotationAnchorLinking()Ensure annotions are linked to anchors correctly.voidParseFragmentId()Ensure fragment IDs are correctly parsed.
-
-
-
Method Detail
-
basicAttributes
public void basicAttributes()
Test setting/getting of basic graph attributes
-
extendedAttributes
public void extendedAttributes()
Test setting/getting of arbitrary attributes
-
basicObjectInterrelation
public void basicObjectInterrelation()
Test relationships between graph elements are held.
-
basicTagging
public void basicTagging()
Test functionality of taggin methods
-
basicSpans
public void basicSpans()
Test span annotation.
-
insertBeforeAfter
public void insertBeforeAfter()
Test annotation insertion results in correctly chaining.
-
createSubdivision
public void createSubdivision()
Test annotation subdivision.
-
basicChangeTracking
public void basicChangeTracking()
Test graph correctly tracks Annotation/Anchor changes.
-
changeOrder
public void changeOrder()
Test graph changes are reported in the correct order.
-
constructionOrder
public void constructionOrder()
Ensure order of creation of Anchors/Annotations is unimportant.
-
annotationHierarchy
public void annotationHierarchy()
Ensure traversals and tests of annotation hierarchy.
-
fragmentByOffset
public void fragmentByOffset()
Test fragment creation by offset.
-
fragmentByAnnotation
public void fragmentByAnnotation()
Test fragment creation by defining annotation.
-
fragmentByUtterance
public void fragmentByUtterance()
Test fragment creation by utterance.
-
fragmentByBoundingAndAncestorAnnotations
public void fragmentByBoundingAndAncestorAnnotations()
Test fragmnet cretion by bounding anchors and ancestor annotation - i.e. filter by participant
-
orderOfAnnotationAnchorLinking
public void orderOfAnnotationAnchorLinking()
Ensure annotions are linked to anchors correctly.
-
firstAndAll
public void firstAndAll()
Test first() and all() function correctly.
-
easyAnchorChaining
public void easyAnchorChaining()
Ensure addAnnotation() automatically creates new anchors as required.
-
compareOffsets1000
public void compareOffsets1000()
Ensure setting offset granularity to 1/1000 works as expected.
-
compareOffsets16000
public void compareOffsets16000()
Ensure setting offset granularity to 1/16000 works as expected.
-
getAnchorAt
public void getAnchorAt()
Test getAnchorAt() works correctly.
-
ParseFragmentId
public void ParseFragmentId()
Ensure fragment IDs are correctly parsed.
-
FragmentId
public void FragmentId()
Ensure fragment IDs are correctly generated.
-
assignWordsToUtterances
public void assignWordsToUtterances()
Ensure assigning words to utterances works as expected.
-
main
public static void main(String[] args)
-
-