Class 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 Detail

      • TestLabbcatView

        public TestLabbcatView()
    • Method Detail

      • createStore

        public static void createStore()
      • notVerbose

        public void notVerbose()
      • invalidCredentials

        public void invalidCredentials()
                                throws Exception
        Throws:
        Exception
      • credentialsRequired

        public void credentialsRequired()
                                 throws Exception
        Throws:
        Exception
      • malformedURLException

        public void malformedURLException()
                                   throws Exception
        Throws:
        Exception
      • getCorpusInfo

        public void getCorpusInfo()
                           throws Exception
        Ensure corpus statistics can be retrieved.
        Throws:
        Exception
      • countMatchingParticipantIds

        public void countMatchingParticipantIds()
                                         throws Exception
        Throws:
        Exception
      • getMatchingParticipantIds

        public void getMatchingParticipantIds()
                                       throws Exception
        Throws:
        Exception
      • getTranscriptIdsInCorpus

        public void getTranscriptIdsInCorpus()
                                      throws Exception
        Throws:
        Exception
      • getTranscriptIdsWithParticipant

        public void getTranscriptIdsWithParticipant()
                                             throws Exception
        Throws:
        Exception
      • countMatchingTranscriptIds

        public void countMatchingTranscriptIds()
                                        throws Exception
        Throws:
        Exception
      • getMatchingTranscriptIds

        public void getMatchingTranscriptIds()
                                      throws Exception
        Throws:
        Exception
      • getFragment

        public void getFragment()
                         throws Exception
        Graph 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
      • countMatchingAnnotations

        public void countMatchingAnnotations()
                                      throws Exception
        Throws:
        Exception
      • getMatchingAnnotations

        public void getMatchingAnnotations()
                                    throws Exception
        Throws:
        Exception
      • aggregateMatchingAnnotations

        public void aggregateMatchingAnnotations()
                                          throws Exception
        Ensure that aggregateMatchingAnnotations works.
        Throws:
        Exception
      • getEpisodeDocuments

        public void getEpisodeDocuments()
                                 throws Exception
        Throws:
        Exception
      • getTaskInvalidNumericId

        public void getTaskInvalidNumericId()
                                     throws Exception
        Throws:
        Exception
      • getTaskInvalidAlphaId

        public void getTaskInvalidAlphaId()
                                   throws Exception
        Throws:
        Exception
      • searchInvalidPattern

        public void searchInvalidPattern()
                                  throws Exception
        Ensure searching with an invalid pattern correctly fails.
        Throws:
        Exception
      • searchAndCancelTask

        public void searchAndCancelTask()
                                 throws Exception
        Ensure searches can be cancelled.
        Throws:
        Exception
      • searchAndGetMatchesAndGetMatchAnnotations

        public void searchAndGetMatchesAndGetMatchAnnotations()
                                                       throws Exception
        Ensure workflow of searching works, from specifying the search to retrieving results
        Throws:
        Exception
      • searchExcludingOverlappingSpeech

        public void searchExcludingOverlappingSpeech()
                                              throws Exception
        Ensure exclusion of overlapping speech in search results works.
        Throws:
        Exception
      • intervalAnnotations

        public void intervalAnnotations()
                                 throws Exception
        Test that annotation labels between start/end times can be extracted.
        Throws:
        Exception
      • getTranscriptAttributes

        public void getTranscriptAttributes()
                                     throws Exception
        Throws:
        Exception
      • getParticipantAttributes

        public void getParticipantAttributes()
                                      throws Exception
        Throws:
        Exception
      • getSerializerDescriptors

        public void getSerializerDescriptors()
                                      throws Exception
        Throws:
        Exception
      • getDeserializerDescriptors

        public void getDeserializerDescriptors()
                                        throws Exception
        Throws:
        Exception
      • getSystemAttribute

        public void getSystemAttribute()
                                throws Exception
        Throws:
        Exception
      • getAnnotatorDescriptor

        public void getAnnotatorDescriptor()
                                    throws Exception
        Throws:
        Exception
      • changePassword

        public void changePassword()
                            throws Exception
        Test the /api/password request is generally handled.
        Throws:
        Exception
      • getDashboardItems

        public void getDashboardItems()
                               throws Exception
        Ensure dashboard items can be retrieved.
        Throws:
        Exception
      • getDashboardItem

        public void getDashboardItem()
                              throws Exception
        Ensure a single dashboard item value can be retrieved.
        Throws:
        Exception
      • readCategories

        public void readCategories()
                            throws Exception
        Ensure a list of categories can be retrieved.
        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)