Package services.gui
Class ImportExportServiceIntegrationTest
- java.lang.Object
-
- testutils.JatosTest
-
- services.gui.ImportExportServiceIntegrationTest
-
public class ImportExportServiceIntegrationTest extends JatosTest
Tests for ImportExportService
-
-
Field Summary
-
Fields inherited from class testutils.JatosTest
admin, apiToken, application, jpaApi, TEST_RESOURCES_POTATO_COMPASS_JZIP
-
-
Constructor Summary
Constructors Constructor Description ImportExportServiceIntegrationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupAfterStudyImport_removesTempDirAndSession()voidcreateStudyExportZipFile_createsZip()voidimportNewStudy()Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 5) !study exists - !udir exists : new study - write bothvoidimportStudy_newStudy_returnsExpectedJsonAndSetsSession()voidimportStudy_whenStudyExistsAndUserNotMember_forbidden()voidimportStudyConfirmed_newStudy_successful()voidimportStudyConfirmed_withoutPriorImport_throwsIOException()voidimportStudyKeepPropertiesOverwriteAssets()Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to keep properties and overwrite assets dirvoidimportStudyOverwritePropertiesAndAssets()Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to overwrite properties and assets dirvoidimportStudyOverwritePropertiesKeepAssets()Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to overwrite properties and keep assets dirvoidimportStudyStudyNewButDirExists()Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 4) !study exists - udir exists Should rename uploaded dir (generate new dir name)-
Methods inherited from class testutils.JatosTest
createApiToken, createUser, dropDatabase, getAdmin, getStudy, importAndGetExampleStudy, importExampleStudy, removeAllLogs, removeAllResultUploads, removeAllStudyAssets, removeAllStudyLogs, removeUser, startApp, stopApp
-
-
-
-
Method Detail
-
importStudy_newStudy_returnsExpectedJsonAndSetsSession
public void importStudy_newStudy_returnsExpectedJsonAndSetsSession()
-
importStudy_whenStudyExistsAndUserNotMember_forbidden
public void importStudy_whenStudyExistsAndUserNotMember_forbidden()
-
importStudyConfirmed_withoutPriorImport_throwsIOException
public void importStudyConfirmed_withoutPriorImport_throwsIOException()
-
importStudyConfirmed_newStudy_successful
public void importStudyConfirmed_newStudy_successful()
-
importNewStudy
public void importNewStudy()
Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 5) !study exists - !udir exists : new study - write both
-
importStudyOverwritePropertiesAndAssets
public void importStudyOverwritePropertiesAndAssets()
Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to overwrite properties and assets dir
-
importStudyKeepPropertiesOverwriteAssets
public void importStudyKeepPropertiesOverwriteAssets()
Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to keep properties and overwrite assets dir
-
importStudyOverwritePropertiesKeepAssets
public void importStudyOverwritePropertiesKeepAssets()
Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 1) study exists - udir exists - udir == cdir User chooses to overwrite properties and keep assets dir
-
importStudyStudyNewButDirExists
public void importStudyStudyNewButDirExists()
Import a uploaded study: there are 5 possible cases: (udir - name of uploaded study asset dir, cdir - name of current study asset dir) Test 4) !study exists - udir exists Should rename uploaded dir (generate new dir name)
-
cleanupAfterStudyImport_removesTempDirAndSession
public void cleanupAfterStudyImport_removesTempDirAndSession()
-
createStudyExportZipFile_createsZip
public void createStudyExportZipFile_createsZip() throws java.lang.Exception- Throws:
java.lang.Exception
-
-