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.FilegetDir()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.
-
-
-
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
-
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)
-
-