Package nzilbb.labbcat
Class TestLabbcatEdit
- java.lang.Object
-
- nzilbb.labbcat.TestLabbcatEdit
-
public class TestLabbcatEdit extends Object
Unit tests for LabbcatEdit.These tests are general in nature. They assume the existence of a valid LaBB-CAT instance (configured by labbcatUrl) but do not 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 TestLabbcatEdit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcreateStore()voidcredentialsRequired()Test failure of missing credentials.voiddeleteTranscriptNotExists()Test failure of deleting a transcript that doesn't exist.voidfragmentUploadAutomaticMapping()Test /api/edit/fragment/* API using automaticMapping, i.e.voidfragmentUploadDelete()Test /api/edit/fragment/* API, specifically: fragmentUpload fragmentUploadDeletevoidfragmentUploadTwoPhase()Test /api/edit/fragment/* API, specifically: fragmentUpload fragmentUploadParametersFilegetDir()Getter forfDir: Directory for text files.voidinheritedLabbcatViewFunctions()Test general methods inherited fromLabbcatViewvoidinvalidCredentials()Test failure of invalid credentials.static voidmain(String[] args)voidmalformedURLException()Test failure of invalid URL.voidnonLabbcatUrl()Test failure of non-LaBB-CAT URL.voidnotVerbose()voidsaveTranscript()Test transcript attributes can be savedvoidsetDir(File fNewDir)Setter forfDir: Directory for text files.voidtranscriptParticipantAndMediaCRUD()Test transcript upload, media upload, and transcript/participant deletion, specifically: newTranscript updateTranscript saveMedia saveEpisodeDocument deleteMedia getParticipant saveParticipant deleteTranscript deleteParticipantvoidtranscriptUpload()Test /api/edit/transcript/* API, specifically: transcriptUpload transcriptUploadParametersvoidtranscriptUploadDelete()Test /api/edit/transcript/* API, specifically: transcriptUpload transcriptUploadDeletevoidunauthorizedRequest()Test rejection of unauthorized requests.voiduploadIntervalAnnotations()Test interval annotations can be uploaded from results CSVvoiduploadParticipantAttributes()Test participant attributes can be uploaded from CSVvoiduploadTokenAnnotations()Test token annotations can be uploaded from results CSVvoiduploadTranscriptAttributes()Test transcript attributes can be uploaded from CSV
-
-
-
Method Detail
-
createStore
public static void createStore()
-
notVerbose
public void notVerbose()
-
invalidCredentials
public void invalidCredentials() throws ExceptionTest failure of invalid credentials.- Throws:
Exception
-
credentialsRequired
public void credentialsRequired() throws ExceptionTest failure of missing credentials.- Throws:
Exception
-
malformedURLException
public void malformedURLException() throws ExceptionTest failure of invalid URL.- Throws:
Exception
-
nonLabbcatUrl
public void nonLabbcatUrl() throws ExceptionTest failure of non-LaBB-CAT URL.- Throws:
Exception
-
unauthorizedRequest
public void unauthorizedRequest() throws ExceptionTest rejection of unauthorized requests.- Throws:
Exception
-
inheritedLabbcatViewFunctions
public void inheritedLabbcatViewFunctions() throws ExceptionTest general methods inherited fromLabbcatView- Throws:
Exception
-
deleteTranscriptNotExists
public void deleteTranscriptNotExists() throws ExceptionTest failure of deleting a transcript that doesn't exist.- Throws:
Exception
-
transcriptUploadDelete
public void transcriptUploadDelete() throws ExceptionTest /api/edit/transcript/* API, specifically:- transcriptUpload
- transcriptUploadDelete
- Throws:
Exception
-
transcriptUpload
public void transcriptUpload() throws ExceptionTest /api/edit/transcript/* API, specifically:- transcriptUpload
- transcriptUploadParameters
- Throws:
Exception
-
transcriptParticipantAndMediaCRUD
public void transcriptParticipantAndMediaCRUD() throws ExceptionTest transcript upload, media upload, and transcript/participant deletion, specifically:- newTranscript
- updateTranscript
- saveMedia
- saveEpisodeDocument
- deleteMedia
- getParticipant
- saveParticipant
- deleteTranscript
- deleteParticipant
- Throws:
Exception
-
saveTranscript
public void saveTranscript() throws ExceptionTest transcript attributes can be saved- Throws:
Exception
-
fragmentUploadDelete
public void fragmentUploadDelete() throws ExceptionTest /api/edit/fragment/* API, specifically:- fragmentUpload
- fragmentUploadDelete
- Throws:
Exception
-
fragmentUploadTwoPhase
public void fragmentUploadTwoPhase() throws ExceptionTest /api/edit/fragment/* API, specifically:- fragmentUpload
- fragmentUploadParameters
- Throws:
Exception
-
fragmentUploadAutomaticMapping
public void fragmentUploadAutomaticMapping() throws ExceptionTest /api/edit/fragment/* API using automaticMapping, i.e. one call to fragmentUpload.- Throws:
Exception
-
uploadParticipantAttributes
public void uploadParticipantAttributes() throws ExceptionTest participant attributes can be uploaded from CSV- Throws:
Exception
-
uploadTranscriptAttributes
public void uploadTranscriptAttributes() throws ExceptionTest transcript attributes can be uploaded from CSV- Throws:
Exception
-
uploadTokenAnnotations
public void uploadTokenAnnotations() throws ExceptionTest token annotations can be uploaded from results CSV- Throws:
Exception
-
uploadIntervalAnnotations
public void uploadIntervalAnnotations() throws ExceptionTest interval annotations can be uploaded from results CSV- 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)
-
-