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 Details

    • TestLabbcatEdit

      public TestLabbcatEdit()
  • Method Details

    • createStore

      public static void createStore()
    • notVerbose

      public void notVerbose()
    • invalidCredentials

      public void invalidCredentials() throws Exception
      Test failure of invalid credentials.
      Throws:
      Exception
    • credentialsRequired

      public void credentialsRequired() throws Exception
      Test failure of missing credentials.
      Throws:
      Exception
    • malformedURLException

      public void malformedURLException() throws Exception
      Test failure of invalid URL.
      Throws:
      Exception
    • nonLabbcatUrl

      public void nonLabbcatUrl() throws Exception
      Test failure of non-LaBB-CAT URL.
      Throws:
      Exception
    • unauthorizedRequest

      public void unauthorizedRequest() throws Exception
      Test rejection of unauthorized requests.
      Throws:
      Exception
    • inheritedLabbcatViewFunctions

      public void inheritedLabbcatViewFunctions() throws Exception
      Test general methods inherited from LabbcatView
      Throws:
      Exception
    • deleteTranscriptNotExists

      public void deleteTranscriptNotExists() throws Exception
      Test failure of deleting a transcript that doesn't exist.
      Throws:
      Exception
    • transcriptUploadDelete

      public void transcriptUploadDelete() throws Exception
      Test /api/edit/transcript/* API, specifically:
      • transcriptUpload
      • transcriptUploadDelete
      Throws:
      Exception
    • transcriptUpload

      public void transcriptUpload() throws Exception
      Test /api/edit/transcript/* API, specifically:
      • transcriptUpload
      • transcriptUploadParameters
      Throws:
      Exception
    • transcriptParticipantAndMediaCRUD

      public void transcriptParticipantAndMediaCRUD() throws Exception
      Test 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 Exception
      Test transcript attributes can be saved
      Throws:
      Exception
    • getDir

      public File getDir()
      Getter for fDir: Directory for text files.
      Returns:
      Directory for text files.
    • setDir

      public void setDir(File fNewDir)
      Setter for fDir: Directory for text files.
      Parameters:
      fNewDir - Directory for text files.
    • main

      public static void main(String[] args)