Package services.gui

Class ImportExportServiceTest


  • public class ImportExportServiceTest
    extends java.lang.Object
    Unit tests for ImportExportService (uses Mockito to isolate dependencies).
    • Constructor Detail

      • ImportExportServiceTest

        public ImportExportServiceTest()
    • Method Detail

      • initStatics

        public static void initStatics()
      • tearDownStatics

        public static void tearDownStatics()
      • setup

        public void setup()
      • importStudy_newStudy_returnsExpectedJsonAndSetsSession

        public void importStudy_newStudy_returnsExpectedJsonAndSetsSession()
                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importStudy_whenStudyExistsAndUserNotMember_forbidden

        public void importStudy_whenStudyExistsAndUserNotMember_forbidden()
                                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createStudyExportZipFile_shouldCallJsonAndZip_andReturnFile

        public void createStudyExportZipFile_shouldCallJsonAndZip_andReturnFile()
                                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importStudyConfirmed_overwriteExistingStudy_moveAssets_andUpdateWithoutDirName_whenKeepCurrentAssetsName

        public void importStudyConfirmed_overwriteExistingStudy_moveAssets_andUpdateWithoutDirName_whenKeepCurrentAssetsName()
                                                                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importStudyConfirmed_createNewStudy_whenNotExisting_andRenameAssetsIfNeeded

        public void importStudyConfirmed_createNewStudy_whenNotExisting_andRenameAssetsIfNeeded()
                                                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importStudyConfirmed_throwsIfNoTempDirInSession

        public void importStudyConfirmed_throwsIfNoTempDirInSession()
                                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importStudyConfirmed_overwrite_existingStudy_forbidden

        public void importStudyConfirmed_overwrite_existingStudy_forbidden()
                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception