Package nzilbb.labbcat
Class TestLabbcatView
- java.lang.Object
-
- nzilbb.labbcat.TestLabbcatView
-
public class TestLabbcatView extends Object
Unit tests for LabbcatView.These tests test the functionality of the client library, not the server.
They assume the existence of a valid LaBB-CAT instance (configured by labbcatUrl) which responds correctly to requests, but do not generally test that the server behaves correctly , nor assume specific corpus content. For the tests to work, the first graph listed in LaBB-CAT must have some words and some media, and the first participant listed must have some transcripts.
-
-
Constructor Summary
Constructors Constructor Description TestLabbcatView()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaggregateMatchingAnnotations()Ensure that aggregateMatchingAnnotations works.voidchangePassword()Test the /api/password request is generally handled.voidcountAnnotations()voidcountMatchingAnnotations()voidcountMatchingParticipantIds()voidcountMatchingTranscriptIds()static voidcreateStore()voidcredentialsRequired()voidgetAnchors()voidgetAnnotations()voidgetAnnotatorDescriptor()voidgetAvailableMedia()voidgetCorpusIds()voidgetCorpusInfo()Ensure corpus statistics can be retrieved.voidgetDashboardItem()Ensure a single dashboard item value can be retrieved.voidgetDashboardItems()Ensure dashboard items can be retrieved.voidgetDeserializerDescriptors()FilegetDir()Getter forfDir: Directory for text files.voidgetEpisodeDocuments()voidgetFragment()Graph fragments can be extracted, by offsests and by defining annotation.voidgetFragments()voidgetId()voidgetInfo()voidgetLayer()voidgetLayerIds()voidgetLayers()voidgetMatchingAnnotations()voidgetMatchingParticipantIds()voidgetMatchingTranscriptIds()voidgetMedia()voidgetMediaFragment()voidgetMediaTracks()voidgetParticipant()voidgetParticipantAttributes()voidgetParticipantDoesntExist()voidgetParticipantIds()voidgetParticipantWithAttributes()voidgetSchema()voidgetSerializerDescriptors()voidgetSoundFragments()voidgetSystemAttribute()voidgetTaskInvalidAlphaId()voidgetTaskInvalidNumericId()voidgetTasks()voidgetTranscript()voidgetTranscriptAttributes()voidgetTranscriptIds()voidgetTranscriptIdsInCorpus()voidgetTranscriptIdsWithParticipant()voidgetUserInfo()voidintervalAnnotations()Test that annotation labels between start/end times can be extracted.voidinvalidCredentials()static voidmain(String[] args)voidmalformedURLException()voidnonLabbcatUrl()voidnotVerbose()voidprocessWithPraat()voidreadAgreement()voidreadCategories()Ensure a list of categories can be retrieved.voidsearchAndCancelTask()Ensure searches can be cancelled.voidsearchAndGetMatchesAndGetMatchAnnotations()Ensure workflow of searching works, from specifying the search to retrieving resultsvoidsearchExcludingOverlappingSpeech()Ensure exclusion of overlapping speech in search results works.voidsearchInvalidPattern()Ensure searching with an invalid pattern correctly fails.voidsetDir(File fNewDir)Setter forfDir: Directory for text files.voidtaskStatus()voidversionInfo()voidwaitForTask()
-
-
-
Method Detail
-
createStore
public static void createStore()
-
notVerbose
public void notVerbose()
-
getCorpusInfo
public void getCorpusInfo() throws ExceptionEnsure corpus statistics can be retrieved.- Throws:
Exception
-
countMatchingParticipantIds
public void countMatchingParticipantIds() throws Exception- Throws:
Exception
-
getMatchingParticipantIds
public void getMatchingParticipantIds() throws Exception- Throws:
Exception
-
getTranscriptIdsWithParticipant
public void getTranscriptIdsWithParticipant() throws Exception- Throws:
Exception
-
countMatchingTranscriptIds
public void countMatchingTranscriptIds() throws Exception- Throws:
Exception
-
getFragment
public void getFragment() throws ExceptionGraph fragments can be extracted, by offsests and by defining annotation.- Throws:
Exception
-
getParticipantWithAttributes
public void getParticipantWithAttributes() throws Exception- Throws:
Exception
-
getParticipantDoesntExist
public void getParticipantDoesntExist() throws Exception- Throws:
Exception
-
aggregateMatchingAnnotations
public void aggregateMatchingAnnotations() throws ExceptionEnsure that aggregateMatchingAnnotations works.- Throws:
Exception
-
searchInvalidPattern
public void searchInvalidPattern() throws ExceptionEnsure searching with an invalid pattern correctly fails.- Throws:
Exception
-
searchAndCancelTask
public void searchAndCancelTask() throws ExceptionEnsure searches can be cancelled.- Throws:
Exception
-
searchAndGetMatchesAndGetMatchAnnotations
public void searchAndGetMatchesAndGetMatchAnnotations() throws ExceptionEnsure workflow of searching works, from specifying the search to retrieving results- Throws:
Exception
-
searchExcludingOverlappingSpeech
public void searchExcludingOverlappingSpeech() throws ExceptionEnsure exclusion of overlapping speech in search results works.- Throws:
Exception
-
intervalAnnotations
public void intervalAnnotations() throws ExceptionTest that annotation labels between start/end times can be extracted.- Throws:
Exception
-
getDeserializerDescriptors
public void getDeserializerDescriptors() throws Exception- Throws:
Exception
-
changePassword
public void changePassword() throws ExceptionTest the /api/password request is generally handled.- Throws:
Exception
-
getDashboardItems
public void getDashboardItems() throws ExceptionEnsure dashboard items can be retrieved.- Throws:
Exception
-
getDashboardItem
public void getDashboardItem() throws ExceptionEnsure a single dashboard item value can be retrieved.- Throws:
Exception
-
readCategories
public void readCategories() throws ExceptionEnsure a list of categories can be retrieved.- Throws:
Exception
-
getDir
public File getDir()
Getter forfDir: Directory for text files.- Returns:
- Directory for text files.
-
setDir
public void setDir(File fNewDir)
Setter forfDir: Directory for text files.- Parameters:
fNewDir- Directory for text files.
-
main
public static void main(String[] args)
-
-