diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/AbstractImportTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/AbstractImportTest.java deleted file mode 100644 index 67d7a0dc388cb81b1d4b5e155003db95af81da7a..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/AbstractImportTest.java +++ /dev/null @@ -1,23 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; -import org.testng.annotations.BeforeSuite; - -import ch.systemsx.cisd.openbis.generic.server.util.TestInitializer; -import ch.systemsx.cisd.openbis.generic.shared.Constants; -import ch.systemsx.cisd.openbis.generic.shared.coreplugin.CorePluginsUtils; - -public class AbstractImportTest extends AbstractTransactionalTestNGSpringContextTests -{ - - private static final String CORE_PLUGINS_FOLDER = "source/core-plugins"; - - @BeforeSuite - public void setupSuite() - { - System.setProperty(CorePluginsUtils.CORE_PLUGINS_FOLDER_KEY, CORE_PLUGINS_FOLDER); - System.setProperty(Constants.ENABLED_MODULES_KEY, "xls-import"); - TestInitializer.initEmptyDbNoIndex(); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportDatasetTypesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportDatasetTypesTest.java deleted file mode 100644 index 61604e5b91b31d14394ec40180c18f17033bdc9e..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportDatasetTypesTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.DataSetType; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportDatasetTypesTest extends AbstractImportTest -{ - - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String DATASET_TYPES_XLS = "dataset_types/normal_dataset.xls"; - - private static final String DATASET_NO_CODE = "dataset_types/no_code.xls"; - - private static final String DATASET_WITH_VALIDATION_SCRIPT = "dataset_types/with_validation.xls"; - - private static final String DATASET_WITHOUT_PROPERTIES = "dataset_types/no_properties.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(ImportVocabularyTypesTest.class.getResource(ImportVocabularyTypesTest.class.getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalDatasetsTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, DATASET_TYPES_XLS))); - // WHEN - DataSetType rawData = TestUtils.getDatasetType(v3api, sessionToken, "RAW_DATA"); - // THEN - assertEquals(rawData.getCode(), "RAW_DATA"); - assertEquals(rawData.getPropertyAssignments().size(), 2); - } - - @Test - @DirtiesContext - public void testDatasetsWithoutPropertiesTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, DATASET_WITHOUT_PROPERTIES))); - // WHEN - DataSetType rawData = TestUtils.getDatasetType(v3api, sessionToken, "RAW_DATA"); - // THEN - assertEquals(rawData.getCode(), "RAW_DATA"); - assertEquals(rawData.getPropertyAssignments().size(), 0); - } - - @Test - @DirtiesContext - public void testSampleTypesWithValidationScript() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, TestUtils.getValidationPluginMap(), - Paths.get(FilenameUtils.concat(FILES_DIR, DATASET_WITH_VALIDATION_SCRIPT))); - // WHEN - DataSetType collection = TestUtils.getDatasetType(v3api, sessionToken, "RAW_DATA"); - // THEN - assertEquals(collection.getValidationPlugin().getName().toUpperCase(), "RAW_DATA.VALID"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoSampleCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, DATASET_NO_CODE))); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentTypesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentTypesTest.java deleted file mode 100644 index 405b24fd03da4851e713760045c33d0dde3be86a..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentTypesTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.ExperimentType; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportExperimentTypesTest extends AbstractImportTest -{ - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String EXPERIMENT_TYPES_XLS = "experiment_types/normal_experiment.xls"; - - private static final String EXPERIMENT_NO_CODE = "experiment_types/no_code.xls"; - - private static final String EXPERIMENT_WITH_VALIDATION_SCRIPT = "experiment_types/with_validation_script.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(ImportVocabularyTypesTest.class.getResource(ImportVocabularyTypesTest.class.getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalExperimentTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPES_XLS))); - // WHEN - ExperimentType collection = TestUtils.getExperimentType(v3api, sessionToken, "COLLECTION"); - // THEN - assertEquals(collection.getCode(), "COLLECTION"); - } - - @Test - @DirtiesContext - public void testExperimentTypesWithValidationScript() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, TestUtils.getValidationPluginMap(), - Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_WITH_VALIDATION_SCRIPT))); - // WHEN - ExperimentType collection = TestUtils.getExperimentType(v3api, sessionToken, "COLLECTION"); - // THEN - assertEquals(collection.getValidationPlugin().getName().toUpperCase(), "COLLECTION.VALID"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoSampleCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_NO_CODE))); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentsTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentsTest.java deleted file mode 100644 index e7f968f048c1ddaf58578c5c7971e9382f23f3a4..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportExperimentsTest.java +++ /dev/null @@ -1,328 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.Experiment; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportExperimentsTest extends AbstractImportTest -{ - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String EXPERIMENT_XLS = "experiments/all_inside.xls"; - - private static final String EXPERIMENTS_ALL_ELSEWHERE = "experiments/all_elsewhere.xls"; - - private static final String EXPERIMENTS_WITH_TYPE_ELSEWHERE = "experiments/experiment_type_elsewhere.xls"; - - private static final String EXPERIMENTS_NO_CODE = "experiments/no_code.xls"; - - private static final String EXPERIMENTS_WITH_NON_MANDATORY_PROPERTY_MISSING = "experiments/no_non_mandatory_property.xls"; - - private static final String EXPERIMENTS_NO_PROJECT_ATTRIBUTE = "experiments/no_project.xls"; - - private static final String EXPERIMENTS_WITH_SPACE_AND_PROJECT_ELSEWHERE = "experiments/space_and_project_elsewhere.xls"; - - private static final String EXPERIMENTS_SPACE_ELSEWHERE = "experiments/space_elsewhere.xls"; - - private static final String EXPERIMENTS_WITH_TYPE_AND_SPACE_ELSEWHERE = "experiments/type_and_space_elsewhere.xls"; - - private static final String EXPERIMENTS_WITH_MANDATORY_PROPERTY_MISSING = "experiments/with_mandatory_property_missing.xls"; - - private static final String EXPERIMENTS_WITH_MANDATORY_PROPERTY_PRESENT = "experiments/with_mandatory_property.xls"; - - private static final String EXPERIMENTS_PROPERTIES_COLUMNS_AS_LABELS = "experiments/with_properties_as_labels.xls"; - - private static final String EXPERIMENTS_PROPERTIES_COLUMNS_AS_LABELS_TYPE_ON_SERVER = "experiments/with_properties_as_labels_type_elsewhere.xls"; - - private static final String SPACE = "experiments/space.xls"; - - private static final String PROJECT = "experiments/project.xls"; - - private static final String EXPERIMENT_TYPE = "experiments/experiment_type.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(this.getClass().getResource(this.getClass().getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testProjectsAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_XLS))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedSecondExperiment() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_XLS))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT2", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT2"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Other Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "Random string"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithEverythingOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_ALL_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithEverythingOnServerAndInXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_XLS))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfExperimentTypeDoesntExist() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_ALL_ELSEWHERE))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfProjectDoesntExist() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_ALL_ELSEWHERE))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithTypeOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_TYPE_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithTypeOnServerAndInXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_TYPE_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfExperimentNoCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_NO_CODE))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWhenNonMandatoryPropertiesAreNotProvided() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_NON_MANDATORY_PROPERTY_MISSING))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), null); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfExperimentNoProject() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_NO_PROJECT_ATTRIBUTE))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithSpaceAndProjectOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_SPACE_AND_PROJECT_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithSpaceOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_SPACE_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWithTypeAndSpaceOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_TYPE_AND_SPACE_ELSEWHERE))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfMandatoryPropertyMissing() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_MANDATORY_PROPERTY_MISSING))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedIfMandatoryPropertyArePresent() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_WITH_MANDATORY_PROPERTY_PRESENT))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWhenPropertiesAreAddressedByLabelsWithTypeInXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_PROPERTIES_COLUMNS_AS_LABELS))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedWhenPropertiesAreAddressedByLabelsWithTypeOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, - Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENTS_PROPERTIES_COLUMNS_AS_LABELS_TYPE_ON_SERVER))); - // WHEN - Experiment experiment = TestUtils.getExperiment(v3api, sessionToken, "TEST_EXPERIMENT", "TEST_PROJECT", "TEST_SPACE"); - // THEN - assertEquals(experiment.getCode(), "TEST_EXPERIMENT"); - assertEquals(experiment.getProject().getCode(), "TEST_PROJECT"); - assertEquals(experiment.getProperties().get("$NAME"), "Value"); - assertEquals(experiment.getProperties().get("DEFAULT_OBJECT_TYPE"), "OBJECT_TYPE"); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportProjectsTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportProjectsTest.java deleted file mode 100644 index 7685f9b3e40bf74460fe7eae26db8bbabe5ec6fb..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportProjectsTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.Project; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportProjectsTest extends AbstractImportTest -{ - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String PROJECTS_XLS = "projects/with_spaces.xls"; - - private static final String PROJECTS_NO_CODE = "projects/no_code.xls"; - - private static final String PROJECTS_NO_DESCRIPTION = "projects/no_desc.xls"; - - private static final String PROJECTS_NO_SPACE = "projects/no_space.xls"; - - private static final String PROJECTS_WITH_SPACES_ON_SERVER = "projects/with_spaces_on_server.xls"; - - private static final String SPACES = "projects/spaces.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(ImportVocabularyTypesTest.class.getResource(this.getClass().getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testProjectsAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_XLS))); - // WHEN - Project project = TestUtils.getProject(v3api, sessionToken, "TEST_PROJECT"); - // THEN - assertEquals(project.getCode(), "TEST_PROJECT"); - assertEquals(project.getDescription(), "TEST"); - assertEquals(project.getSpace().getCode(), "TEST_SPACE"); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedSecondProject() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_XLS))); - // WHEN - Project project = TestUtils.getProject(v3api, sessionToken, "TEST_PROJECT2"); - // THEN - assertEquals(project.getCode(), "TEST_PROJECT2"); - assertEquals(project.getDescription(), "description of another project"); - assertEquals(project.getSpace().getCode(), "TEST_SPACE2"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoProjectCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_NO_CODE))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedNoDescription() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_NO_DESCRIPTION))); - // WHEN - Project project = TestUtils.getProject(v3api, sessionToken, "TEST_PROJECT"); - // THEN - assertEquals(project.getCode(), "TEST_PROJECT"); - assertEquals(project.getDescription(), null); - assertEquals(project.getSpace().getCode(), "TEST_SPACE"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoProjectSpace() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_NO_SPACE))); - } - - @Test - @DirtiesContext - public void testProjectsAreCreatedSpaceOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACES))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECTS_WITH_SPACES_ON_SERVER))); - // WHEN - Project project = TestUtils.getProject(v3api, sessionToken, "TEST_PROJECT"); - // THEN - assertEquals(project.getCode(), "TEST_PROJECT"); - assertEquals(project.getDescription(), "TEST"); - assertEquals(project.getSpace().getCode(), "TEST_SPACE"); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportPropertyTypesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportPropertyTypesTest.java deleted file mode 100644 index 4c8a1b333dd61832cd134599694fd97407a18df4..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportPropertyTypesTest.java +++ /dev/null @@ -1,148 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.DataType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.PropertyType; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportPropertyTypesTest extends AbstractImportTest -{ - - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String PROPERTY_TYPES_XLS = "property_types/normal_property_type.xls"; - - private static final String PROPERTY_NO_CODE = "property_types/no_code.xls"; - - private static final String PROPERTY_NO_DATA_TYPE = "property_types/no_data_type.xls"; - - private static final String PROPERTY_NO_DESCRIPTION = "property_types/no_desc.xls"; - - private static final String PROPERTY_NO_LABEL = "property_types/no_label.xls"; - - private static final String PROPERTY_VOCAB_TYPE_NO_VOCABULARY_CODE = "property_types/no_vocab_code.xls"; - - private static final String PROPERTY_NON_VOCAB_TYPE_VOCABULARY_CODE = "property_types/vocabcode_when_not_vocabtype.xls"; - - private static final String PROPERTY_VOCABULARY_ON_SERVER = "property_types/with_vocab_on_server.xls"; - - private static final String PROPERTY_VOCAB_TYPE = "property_types/with_vocab.xls"; - - private static final String VOCABULARY_DETECTION = "property_types/vocabulary_detection.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(ImportVocabularyTypesTest.class.getResource(this.getClass().getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalPropertyTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_TYPES_XLS))); - // WHEN - PropertyType notes = TestUtils.getPropertyType(v3api, sessionToken, "NOTES"); - // THEN - assertEquals(notes.getCode(), "NOTES"); - assertEquals(notes.getLabel(), "Notes"); - assertEquals(notes.getDataType(), DataType.MULTILINE_VARCHAR); - assertEquals(notes.getDescription(), "Notes Descripton"); - assertFalse(notes.isInternalNameSpace()); - assertFalse(notes.isManagedInternally()); - assertNull(notes.getVocabulary()); - } - - @Test - @DirtiesContext - public void testInternalPropertyTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_TYPES_XLS))); - // WHEN - PropertyType notes = TestUtils.getPropertyType(v3api, sessionToken, "$INTERNAL_PROP"); - // THEN - assertEquals(notes.getCode(), "$INTERNAL_PROP"); - assertEquals(notes.getLabel(), "Name"); - assertEquals(notes.getDataType(), DataType.VARCHAR); - assertEquals(notes.getDescription(), "Name"); - assertTrue(notes.isInternalNameSpace()); - assertFalse(notes.isManagedInternally()); - assertNull(notes.getVocabulary()); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeNoCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_NO_CODE))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeNoLabel() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_NO_LABEL))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeNoVocabularyCodeWhenVocabularyType() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_VOCAB_TYPE_NO_VOCABULARY_CODE))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeNoDataType() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_NO_DATA_TYPE))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeNoDescription() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_NO_DESCRIPTION))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void testPropertyTypeVocabularyCodeToNonVocabularyType() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROPERTY_NON_VOCAB_TYPE_VOCABULARY_CODE))); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSampleTypesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSampleTypesTest.java deleted file mode 100644 index 5e4a97922e6f9ac077f6e3913ec2eabd6f482d27..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSampleTypesTest.java +++ /dev/null @@ -1,233 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.plugin.Plugin; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.plugin.PluginType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.PropertyAssignment; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.SampleType; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportSampleTypesTest extends AbstractImportTest -{ - - private static final String SAMPLE_TYPES_XLS = "sample_types/normal_samples.xls"; - - private static final String SAMPLE_TYPES_XLS_DIFFERENT_PROPERTY_ASSIGN = "sample_types/normal_samples_v2.xls"; - - private static final String SAMPLE_TYPES_WITH_DYNAMIC_SCRIPT = "sample_types/with_dynamic_script.xls"; - - private static final String SAMPLE_TYPES_WITH_VALIDATION_SCRIPT = "sample_types/with_validation_script.xls"; - - private static final String SAMPLE_TYPES_WITH_VOCABULARY = "sample_types/with_vocabulary_in_xls.xls"; - - private static final String SAMPLE_TYPES_WITH_VOCABULARY_ON_SERVER = "sample_types/with_vocabulary_on_server.xls"; - - private static final String VOCABULARY_DETECTION = "sample_types/vocabulary_detection.xls"; - - private static final String SAMPLE_TYPES_WITH_AUTO_GENERATED_CODES = "sample_types/with_auto_generated_codes.xls"; - - private static final String SAMPLE_TYPE_NO_CODE = "sample_types/no_code.xls"; - - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = - Paths.get(ImportVocabularyTypesTest.class.getResource(ImportVocabularyTypesTest.class.getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalSampleTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_XLS))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - assertFalse(antibody.isAutoGeneratedCode()); - } - - @Test - @DirtiesContext - public void testPropertyTypeAssignmentsFromNormalSampleTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_XLS))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - boolean allMandatory = antibody.getPropertyAssignments().stream().allMatch(propAssignment -> propAssignment.isMandatory() == true); - boolean allShownInEditView = - antibody.getPropertyAssignments().stream().allMatch(propAssignment -> propAssignment.isShowInEditView() == true); - boolean generalInformationExists = - antibody.getPropertyAssignments().stream().anyMatch(propAssignment -> propAssignment.getSection().equals("General information")); - boolean someOtherSectionExists = - antibody.getPropertyAssignments().stream().anyMatch(propAssignment -> propAssignment.getSection().equals("Some other section")); - boolean threePropertyAssignments = antibody.getPropertyAssignments().size() == 3; - assertTrue(threePropertyAssignments); - assertTrue(generalInformationExists); - assertTrue(someOtherSectionExists); - assertTrue(allShownInEditView); - assertTrue(allMandatory); - } - - @Test - @DirtiesContext - public void testPropertyTypeAssignmentsFromNormalv2SampleTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_XLS_DIFFERENT_PROPERTY_ASSIGN))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - boolean allNotMandatory = antibody.getPropertyAssignments().stream().allMatch(propAssignment -> propAssignment.isMandatory() == false); - boolean allNotShownInEditView = - antibody.getPropertyAssignments().stream().allMatch(propAssignment -> propAssignment.isShowInEditView() == false); - boolean threePropertyAssignments = antibody.getPropertyAssignments().size() == 3; - assertTrue(threePropertyAssignments); - assertTrue(allNotShownInEditView); - assertTrue(allNotMandatory); - } - - @Test - @DirtiesContext - public void testPropertyTypesFromNormalSampleTypesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_XLS))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - boolean namePropertyExists = - antibody.getPropertyAssignments().stream().anyMatch(propAssignment -> propAssignment.getPropertyType().getCode().equals("$NAME")); - boolean forWhatPropertyExists = - antibody.getPropertyAssignments().stream().anyMatch(propAssignment -> propAssignment.getPropertyType().getCode().equals("FOR_WHAT")); - boolean epitopePropertyExists = - antibody.getPropertyAssignments().stream().anyMatch(propAssignment -> propAssignment.getPropertyType().getCode().equals("EPITOPE")); - - assertNotNull(antibody); - assertTrue(namePropertyExists); - assertTrue(forWhatPropertyExists); - assertTrue(epitopePropertyExists); - } - - @Test - @DirtiesContext - public void testSampleTypesWithPropertyHavingDynamicScript() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, TestUtils.getDynamicPluginMap(), - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_WITH_DYNAMIC_SCRIPT))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - Plugin dynamicScript = antibody.getPropertyAssignments().get(0).getPlugin(); - assertNotNull(dynamicScript); - assertEquals(dynamicScript.getName().toUpperCase(), "$NAME.DYNAMIC"); - assertEquals(dynamicScript.getScript(), TestUtils.getDynamicScript()); - assertEquals(dynamicScript.getPluginType(), PluginType.DYNAMIC_PROPERTY); - } - - @Test - @DirtiesContext - public void testSampleTypesWithPropertyHavingValidationScript() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, TestUtils.getValidationPluginMap(), - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_WITH_VALIDATION_SCRIPT))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - Plugin validationScript = antibody.getValidationPlugin(); - assertNotNull(validationScript); - assertEquals(validationScript.getName().toUpperCase(), "ANTIBODY.VALID"); - assertEquals(validationScript.getScript(), TestUtils.getValidationScript()); - assertEquals(validationScript.getPluginType(), PluginType.ENTITY_VALIDATION); - } - - @Test - @DirtiesContext - public void testSampleTypesWithVocabularyInXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_WITH_VOCABULARY))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - PropertyAssignment propertyAssignment = antibody.getPropertyAssignments().get(0); - assertNotNull(propertyAssignment); - assertEquals(propertyAssignment.getPropertyType().getVocabulary().getCode(), "DETECTION"); - } - - @Test - @DirtiesContext - public void testSampleTypesWithVocabularyOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARY_DETECTION))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_WITH_VOCABULARY_ON_SERVER))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "ANTIBODY"); - // THEN - PropertyAssignment propertyAssignment = antibody.getPropertyAssignments().get(0); - assertNotNull(propertyAssignment); - assertEquals(propertyAssignment.getPropertyType().getVocabulary().getCode(), "DETECTION"); - } - - @Test - @DirtiesContext - public void testSampleTypesWithAutoGeneratedCodeAttribute() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPES_WITH_AUTO_GENERATED_CODES))); - // WHEN - SampleType antibody = TestUtils.getSampleType(v3api, sessionToken, "SECONDBODY"); - // THEN - assertTrue(antibody.isAutoGeneratedCode()); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoSampleCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPE_NO_CODE))); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSamplesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSamplesTest.java deleted file mode 100644 index 3eb5d61c9395f92cc22e81caec1235c5b2c8daa5..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSamplesTest.java +++ /dev/null @@ -1,225 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.Sample; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportSamplesTest extends AbstractImportTest -{ - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String SAMPLES_XLS = "samples/all_in.xls"; - - private static final String SAMPLES_SPACE_ELSEWHERE = "samples/space_elsewhere.xls"; - - private static final String SAMPLES_SAMPLE_TYPE_ELSWHERE = "samples/sample_type_elsewhere.xls"; - - private static final String SAMPLES_SPACE_PROJECT_EXPERIMENT_ELSEWHERE = "samples/space_project_experiment_elsewhere.xls"; - - private static final String SPACE = "samples/space.xls"; - - private static final String SAMPLE_TYPE = "samples/sample_type.xls"; - - private static final String VOCABULARY_TYPE = "samples/vocab_type.xls"; - - private static final String EXPERIMENT = "samples/experiment.xls"; - - private static final String EXPERIMENT_TYPE = "samples/experiment_type.xls"; - - private static final String PROJECT = "samples/project.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(this.getClass().getResource(this.getClass().getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testSamplesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_XLS))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "AAA", "TEST_SPACE"); - // THEN - assertEquals(sample.getCode(), "AAA"); - assertEquals(sample.getProject(), null); - assertEquals(sample.getExperiment().getCode(), "TEST_EXPERIMENT2"); - assertEquals(sample.getSpace().getCode(), "TEST_SPACE"); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedSecondSample() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_XLS))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertEquals(sample.getCode(), "VVV"); - assertEquals(sample.getProject(), null); - assertEquals(sample.getExperiment().getCode(), "TEST_EXPERIMENT"); - assertEquals(sample.getSpace().getCode(), "TEST_SPACE"); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedThirdSample() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_XLS))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "S1", "TEST_SPACE"); - // THEN - assertEquals(sample.getCode(), "S1"); - assertEquals(sample.getProject(), null); - assertEquals(sample.getExperiment().getCode(), "TEST_EXPERIMENT"); - assertEquals(sample.getSpace().getCode(), "TEST_SPACE"); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSpaceOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_ELSEWHERE))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSpaceInSeparateXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_ELSEWHERE)), - Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfSpaceDoesntExist() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_ELSEWHERE))); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSampleTypeOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, - Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARY_TYPE)), - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SAMPLE_TYPE_ELSWHERE))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSampleTypeInSeparateXls() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SAMPLE_TYPE_ELSWHERE)), - Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLE_TYPE))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfSamplesSpaceProjectDoesntExist() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_PROJECT_EXPERIMENT_ELSEWHERE))); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSamplesSpaceProjectTypeOnServer() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT_TYPE))); - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT))); - try - { - Thread.sleep(2000); - } catch (InterruptedException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_PROJECT_EXPERIMENT_ELSEWHERE))); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - - @Test - @DirtiesContext - public void testSamplesAreCreatedWhenSamplesSpaceProjectInSeparateXls() throws IOException - { - // GIVEN - Path space = Paths.get(FilenameUtils.concat(FILES_DIR, SPACE)); - Path project = Paths.get(FilenameUtils.concat(FILES_DIR, PROJECT)); - Path experiment = Paths.get(FilenameUtils.concat(FILES_DIR, EXPERIMENT)); - Path samples = Paths.get(FilenameUtils.concat(FILES_DIR, SAMPLES_SPACE_PROJECT_EXPERIMENT_ELSEWHERE)); - TestUtils.createFrom(v3api, sessionToken, space, experiment, samples, project); - // WHEN - Sample sample = TestUtils.getSample(v3api, sessionToken, "VVV", "TEST_SPACE"); - // THEN - assertNotNull(sample); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSpacesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSpacesTest.java deleted file mode 100644 index 657e4b86a9605c7e6b277860b5ff3a9ea8a8e951..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportSpacesTest.java +++ /dev/null @@ -1,103 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.DataSetType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.Space; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportSpacesTest extends AbstractImportTest -{ - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static final String SPACES_XLS = "spaces/normal_spaces.xls"; - - private static final String SPACES_NO_CODE = "spaces/no_code.xls"; - - private static final String SPACES_NO_DESCRIPTION = "spaces/no_desc.xls"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = Paths.get(ImportVocabularyTypesTest.class.getResource(ImportVocabularyTypesTest.class.getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalSpacesAreCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACES_XLS))); - // WHEN - Space rawData = TestUtils.getSpace(v3api, sessionToken, "TEST_SPACE"); - // THEN - assertEquals(rawData.getCode(), "TEST_SPACE"); - assertEquals(rawData.getDescription(), "TEST"); - } - - @Test - @DirtiesContext - public void testNormalSpacesAreCreatedSecondSpace() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACES_XLS))); - // WHEN - Space space = TestUtils.getSpace(v3api, sessionToken, "TEST_SPACE2"); - // THEN - assertEquals(space.getCode(), "TEST_SPACE2"); - assertEquals(space.getDescription(), "TEST desc"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoSpaceCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACES_NO_CODE))); - } - - @Test - @DirtiesContext - public void shouldCreateSpaceWhenNoDescription() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, SPACES_NO_DESCRIPTION))); - // WHEN - Space space = TestUtils.getSpace(v3api, sessionToken, "TEST_SPACE"); - // THEN - assertEquals(space.getCode(), "TEST_SPACE"); - assertEquals(space.getDescription(), null); - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportVocabularyTypesTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportVocabularyTypesTest.java deleted file mode 100644 index 5c4f3ae5791cdea835715022bc704b64532f57dc..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/ImportVocabularyTypesTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2015 ETH Zuerich, SIS - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.nio.file.Paths; -import java.util.List; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.Vocabulary; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.VocabularyTerm; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; -import ch.systemsx.cisd.common.exceptions.UserFailureException; -import ch.systemsx.cisd.openbis.generic.server.util.TestInitializer; -import ch.systemsx.cisd.openbis.generic.shared.Constants; -import ch.systemsx.cisd.openbis.generic.shared.coreplugin.CorePluginsUtils; - -@ContextConfiguration(locations = "classpath:applicationContext.xml") -@TransactionConfiguration(transactionManager = "transaction-manager") -public class ImportVocabularyTypesTest extends AbstractImportTest -{ - - private static final String VOCABULARIES_TYPES_XLS = "vocabularies/normal_vocab.xls"; - - private static final String VOCABULARIES_NO_CODE = "vocabularies/vocab_no_code.xlsx"; - - private static final String VOCABULARIES_NO_DESCRIPTION = "vocabularies/vocab_no_desc.xlsx"; - - private static final String VOCABULARIES_NO_TERM_CODE = "vocabularies/vocab_no_term_code.xlsx"; - - private static final String VOCABULARIES_NO_TERM_DESCRIPTION = "vocabularies/vocab_no_term_desc.xlsx"; - - private static final String VOCABULARIES_NO_TERM_LABEL = "vocabularies/vocab_no_term_label.xlsx"; - - private static final String VOCABULARIES_NO_TERMS = "vocabularies/vocab_no_term_label.xlsx"; - - @Autowired - private IApplicationServerInternalApi v3api; - - private static final String TEST_USER = "test"; - - private static final String PASSWORD = "password"; - - private static String FILES_DIR; - - private String sessionToken; - - @BeforeClass - public void setupClass() throws IOException - { - String testDir = - Paths.get(ImportVocabularyTypesTest.class.getResource(ImportVocabularyTypesTest.class.getSimpleName() + ".class").getPath()) - .getParent().toString(); - FILES_DIR = FilenameUtils.concat(testDir, "test_files"); - - } - - @BeforeMethod - public void beforeTest() - { - sessionToken = v3api.login(TEST_USER, PASSWORD); - } - - @Test - @DirtiesContext - public void testNormalVocabularyCreationIsCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_TYPES_XLS))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - assertNotNull(detection); - assertEquals(detection.getDescription(), "Protein detection system"); - } - - @Test - @DirtiesContext - public void testNormalVocabularyHasFirstTermCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_TYPES_XLS))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - VocabularyTerm term = detection.getTerms().get(0); - assertEquals(term.getCode(), "HRP"); - assertEquals(term.getDescription(), "The antibody is conjugated with the horseradish peroxydase"); - assertEquals(term.getLabel(), "horseradish peroxydase"); - } - - @Test - @DirtiesContext - public void testNormalVocabularyCreatedNoExtraVocabulary() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_TYPES_XLS))); - // WHEN - List<Vocabulary> vocabularies = TestUtils.getAllVocabularies(v3api, sessionToken); - // THEN - assertEquals(vocabularies.size(), 3); // 2 created + 1 default - } - - @Test - @DirtiesContext - public void testNormalVocabularyHasSecondTermCreated() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_TYPES_XLS))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - VocabularyTerm term = detection.getTerms().get(1); - assertEquals(term.getCode(), "TEST_VOC"); - assertEquals(term.getDescription(), "some focabulary that is used in tests and nothing else"); - assertEquals(term.getLabel(), "vocabulary for tests"); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoVocabularyCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_CODE))); - } - - @Test(expectedExceptions = UserFailureException.class) - public void shouldThrowExceptionIfNoTermCode() throws IOException - { - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_TERM_CODE))); - } - - @Test - public void shouldNotThrowExceptionIfNoVocabularyDescription() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_DESCRIPTION))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - assertNotNull(detection); - assertNull(detection.getDescription()); - } - - @Test - public void shouldNotThrowExceptionIfNoTermLabel() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_TERM_LABEL))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - assertNotNull(detection); - assertNull(detection.getTerms().get(0).getLabel()); - } - - @Test - public void shouldNotThrowExceptionIfNoTerms() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_TERMS))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - assertNotNull(detection); - } - - @Test - public void w() throws IOException - { - // GIVEN - TestUtils.createFrom(v3api, sessionToken, Paths.get(FilenameUtils.concat(FILES_DIR, VOCABULARIES_NO_TERM_DESCRIPTION))); - // WHEN - Vocabulary detection = TestUtils.getVocabulary(v3api, sessionToken, "DETECTION"); - // THEN - assertNotNull(detection); - assertNull(detection.getTerms().get(0).getDescription()); - } - -} \ No newline at end of file diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/TestUtils.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/TestUtils.java deleted file mode 100644 index a64c2107175a56024ed4e7058145b3a7d7244172..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/TestUtils.java +++ /dev/null @@ -1,318 +0,0 @@ -package ch.ethz.sis.openbis.systemtest.plugin.excelimport; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchResult; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.DataSetType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.DataSetTypeFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.DataSetTypeSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.Experiment; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.ExperimentType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.fetchoptions.ExperimentFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.fetchoptions.ExperimentTypeFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.IExperimentId; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.search.ExperimentTypeSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.Project; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.fetchoptions.ProjectFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.search.ProjectSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.PropertyType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.fetchoptions.PropertyAssignmentFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.fetchoptions.PropertyTypeFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.search.PropertyTypeSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.Sample; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.SampleType; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.fetchoptions.SampleFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.fetchoptions.SampleTypeFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.ISampleId; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SampleIdentifier; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.search.SampleTypeSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.service.CustomASServiceExecutionOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.service.id.CustomASServiceCode; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.Space; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.fetchoptions.SpaceFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.search.SpaceSearchCriteria; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.Vocabulary; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.fetchoptions.VocabularyFetchOptions; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.id.VocabularyPermId; -import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.search.VocabularySearchCriteria; -import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; - -public class TestUtils -{ - - public static final String XLS_PARAM = "xls"; - - public static final String SCRIPTS_PARAM = "scripts"; - - public static final String XLS_IMPORT_API = "xls-import-api"; - - static Vocabulary getVocabulary(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - VocabularySearchCriteria criteria = new VocabularySearchCriteria(); - criteria.withId().thatEquals(new VocabularyPermId(code)); - - VocabularyFetchOptions fo = new VocabularyFetchOptions(); - fo.withTerms(); - - SearchResult<Vocabulary> result = v3api.searchVocabularies(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static List<Vocabulary> getAllVocabularies(IApplicationServerInternalApi v3api, String sessionToken) - { - VocabularySearchCriteria criteria = new VocabularySearchCriteria(); - VocabularyFetchOptions fo = new VocabularyFetchOptions(); - fo.withTerms(); - - SearchResult<Vocabulary> result = v3api.searchVocabularies(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects(); - } else - { - return null; - } - } - - static SampleType getSampleType(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - SampleTypeSearchCriteria criteria = new SampleTypeSearchCriteria(); - criteria.withCode().thatEquals(code); - - SampleTypeFetchOptions fo = new SampleTypeFetchOptions(); - fo.withValidationPlugin().withScript(); - PropertyAssignmentFetchOptions propCriteria = fo.withPropertyAssignments(); - propCriteria.withPlugin().withScript(); - propCriteria.withPropertyType().withVocabulary(); - - SearchResult<SampleType> result = v3api.searchSampleTypes(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static ExperimentType getExperimentType(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - ExperimentTypeSearchCriteria criteria = new ExperimentTypeSearchCriteria(); - criteria.withCode().thatEquals(code); - - ExperimentTypeFetchOptions fo = new ExperimentTypeFetchOptions(); - fo.withValidationPlugin().withScript(); - PropertyAssignmentFetchOptions propCriteria = fo.withPropertyAssignments(); - propCriteria.withPlugin().withScript(); - propCriteria.withPropertyType().withVocabulary(); - - SearchResult<ExperimentType> result = v3api.searchExperimentTypes(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static DataSetType getDatasetType(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - DataSetTypeSearchCriteria criteria = new DataSetTypeSearchCriteria(); - criteria.withCode().thatEquals(code); - - DataSetTypeFetchOptions fo = new DataSetTypeFetchOptions(); - fo.withValidationPlugin().withScript(); - PropertyAssignmentFetchOptions propCriteria = fo.withPropertyAssignments(); - propCriteria.withPlugin().withScript(); - propCriteria.withPropertyType().withVocabulary(); - - SearchResult<DataSetType> result = v3api.searchDataSetTypes(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static PropertyType getPropertyType(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - PropertyTypeSearchCriteria criteria = new PropertyTypeSearchCriteria(); - criteria.withCode().thatEquals(code); - - PropertyTypeFetchOptions fo = new PropertyTypeFetchOptions(); - fo.withVocabulary(); - - SearchResult<PropertyType> result = v3api.searchPropertyTypes(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static Space getSpace(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - SpaceSearchCriteria criteria = new SpaceSearchCriteria(); - criteria.withCode().thatEquals(code); - - SpaceFetchOptions fo = new SpaceFetchOptions(); - - SearchResult<Space> result = v3api.searchSpaces(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static Project getProject(IApplicationServerInternalApi v3api, String sessionToken, String code) - { - ProjectSearchCriteria criteria = new ProjectSearchCriteria(); - criteria.withCode().thatEquals(code); - - ProjectFetchOptions fo = new ProjectFetchOptions(); - fo.withSpace(); - - SearchResult<Project> result = v3api.searchProjects(sessionToken, criteria, fo); - - if (result.getObjects().size() > 0) - { - return result.getObjects().get(0); - } else - { - return null; - } - } - - static Experiment getExperiment(IApplicationServerInternalApi v3api, String sessionToken, String experimentCode, String projectCode, - String spaceCode) - { - List<IExperimentId> ids = new ArrayList<>(); - ids.add(new ExperimentIdentifier(spaceCode, projectCode, experimentCode)); - - ExperimentFetchOptions fo = new ExperimentFetchOptions(); - fo.withProject(); - fo.withProperties(); - fo.withType(); - - List<Experiment> result = v3api.getExperiments(sessionToken, ids, fo).values().stream().collect(Collectors.toList()); - - if (result.size() > 0) - { - return result.get(0); - } else - { - return null; - } - } - - static Sample getSample(IApplicationServerInternalApi v3api, String sessionToken, String sampleCode, String spaceCode) - { - List<ISampleId> ids = new ArrayList<>(); - ids.add(new SampleIdentifier(spaceCode, null, null, sampleCode)); - - SampleFetchOptions fo = new SampleFetchOptions(); - fo.withChildren(); - fo.withParents(); - fo.withExperiment(); - fo.withProject(); - fo.withProperties(); - fo.withSpace(); - fo.withType(); - - List<Sample> result = v3api.getSamples(sessionToken, ids, fo).values().stream().collect(Collectors.toList()); - - if (result.size() > 0) - { - return result.get(0); - } else - { - return null; - } - } - - static String createFrom(IApplicationServerInternalApi v3api, String sessionToken, Path... xls_paths) throws IOException - { - List<byte[]> excels = new ArrayList<>(); - for (Path xls_path : xls_paths) - { - byte[] xls = Files.readAllBytes(xls_path); - excels.add(xls); - } - CustomASServiceExecutionOptions options = new CustomASServiceExecutionOptions(); - options.withParameter(XLS_PARAM, excels); - return (String) v3api.executeCustomASService(sessionToken, new CustomASServiceCode(XLS_IMPORT_API), options); - } - - static String createFrom(IApplicationServerInternalApi v3api, String sessionToken, Map<String, String> scripts, Path... xls_paths) - throws IOException - { - List<byte[]> excels = new ArrayList<>(); - for (Path xls_path : xls_paths) - { - byte[] xls = Files.readAllBytes(xls_path); - excels.add(xls); - } - CustomASServiceExecutionOptions options = new CustomASServiceExecutionOptions(); - options.withParameter(XLS_PARAM, excels); - options.withParameter(SCRIPTS_PARAM, scripts); - return (String) v3api.executeCustomASService(sessionToken, new CustomASServiceCode(XLS_IMPORT_API), options); - } - - static String getValidationScript() - { - return "def validate(entity, isNew):\n if isNew:\n return"; - } - - static String getDynamicScript() - { - return "def calculate():\n return 1"; - } - - static Map<String, String> getValidationPluginMap() - { - String dynamicScriptString = getValidationScript(); - Map<String, String> scriptsMap = new HashMap<>(); - scriptsMap.put("valid.py", dynamicScriptString); - - return scriptsMap; - } - - static Map<String, String> getDynamicPluginMap() - { - String dynamicScriptString = getDynamicScript(); - Map<String, String> scriptsMap = new HashMap<>(); - scriptsMap.put("dynamic/dynamic.py", dynamicScriptString); - - return scriptsMap; - } - -} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_code.xls deleted file mode 100644 index d54b992af7d5ef3497b591b71b0a937aeecee4c6..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_properties.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_properties.xls deleted file mode 100644 index 5a4648215981dec891c3791194051c2e247ddbfd..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/no_properties.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/normal_dataset.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/normal_dataset.xls deleted file mode 100644 index d72039c8ae394e9954c07af64559e7d34a812961..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/normal_dataset.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/with_validation.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/with_validation.xls deleted file mode 100644 index cdee2cb18599a074ff8c34a4666c7a46027d080c..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/dataset_types/with_validation.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/no_code.xls deleted file mode 100644 index bcae94a211270a70536fbeb0c0128e35813f4d76..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/normal_experiment.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/normal_experiment.xls deleted file mode 100644 index d3c3dda61bd16fa12d7ab9bbaf65cba6ba70caa2..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/normal_experiment.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/with_validation_script.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/with_validation_script.xls deleted file mode 100644 index 20daeadf5af7c7a35d34185b165cb95a6decfc23..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiment_types/with_validation_script.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_elsewhere.xls deleted file mode 100644 index fa502e8210ac48b660a275973dd373cabdbc351a..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_inside.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_inside.xls deleted file mode 100644 index 48fe7da35a0f258b912a5449d61a69dab46ebc64..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/all_inside.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type.xls deleted file mode 100644 index 79d7b595f514ef121fb09f982c5e9ec1f50efe05..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type_elsewhere.xls deleted file mode 100644 index 5b5939c6d0491056bdd0f551c2df7bbade805f1c..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/experiment_type_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_code.xls deleted file mode 100644 index e768de099fb1028c3c631e60384f6a6037d2075d..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_non_mandatory_property.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_non_mandatory_property.xls deleted file mode 100644 index f6f9c73a5872c901a041afe139ca6097153a81e8..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_non_mandatory_property.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_project.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_project.xls deleted file mode 100644 index b10a360b48af59ead2b011f4697a55e325679f64..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/no_project.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/project.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/project.xls deleted file mode 100644 index 22fe9892d7d761ca40f1007c3ad4d257c1eedf6e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/project.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space.xls deleted file mode 100644 index f38abaf801838e24b49534c7e95ec11d69a5733d..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_and_project_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_and_project_elsewhere.xls deleted file mode 100644 index 662154538b1d733036d6d7ae60cc5e6948175f7a..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_and_project_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_elsewhere.xls deleted file mode 100644 index 002041a89a52c99a4b3334778eca0e2e715a317d..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/space_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/type_and_space_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/type_and_space_elsewhere.xls deleted file mode 100644 index ca53bd70919b60029dcf4876ff0a65571c3f9224..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/type_and_space_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property.xls deleted file mode 100644 index bb9a38e731caee28ea3164d7735da5a8c3aee1fc..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property_missing.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property_missing.xls deleted file mode 100644 index 2232c73fd30a0d85ffb21a4146f818f333fa6989..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_mandatory_property_missing.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels.xls deleted file mode 100644 index 2cd522d4a96d4eda75587ba4878e561e26fe5085..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels_type_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels_type_elsewhere.xls deleted file mode 100644 index 05a162bffb0ed5d4a768e0414d1b5c7c64a3c860..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/experiments/with_properties_as_labels_type_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/dynamic/dynamic.py b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/dynamic/dynamic.py deleted file mode 100644 index 187583711b0b2d81f1ad5525763cae8d23561239..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/dynamic/dynamic.py +++ /dev/null @@ -1,2 +0,0 @@ -def calculate(): - return 1 \ No newline at end of file diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/valid.py b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/valid.py deleted file mode 100644 index d87950f600d11b50b96dcedef36fe8f36971140c..0000000000000000000000000000000000000000 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/scripts/valid.py +++ /dev/null @@ -1,3 +0,0 @@ -def validate(entity, isNew): - if isNew: - return \ No newline at end of file diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/types.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/types.xls deleted file mode 100644 index c859da3c3dcf761af1c72df29ba1ba1f8f583e59..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/full/types.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_code.xls deleted file mode 100644 index 40565df30dd0a1cbab6b9fd1bf8e98cc37d98713..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_desc.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_desc.xls deleted file mode 100644 index 256aff470a2c0e67bf6e8ca7c0574b57bfd9384a..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_desc.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_space.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_space.xls deleted file mode 100644 index be1a6f5b673089c4d40f17c3f79ed055202e3736..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/no_space.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/spaces.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/spaces.xls deleted file mode 100644 index ee521c4efcf08b1f3263ffbf239d07a1f784ab2b..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/spaces.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces.xls deleted file mode 100644 index 124040d0a40c49d88cec4de77dab2616c88e355f..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces_on_server.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces_on_server.xls deleted file mode 100644 index c372754c23f24f7491ca9e20132dd151d05a881f..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/projects/with_spaces_on_server.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_code.xls deleted file mode 100644 index 0495c967c5583cdd003fa7db0d9e03bd3ac53660..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_data_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_data_type.xls deleted file mode 100644 index ea8c86ae63ab1cd00c3925c7ad483bad33f98918..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_data_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_desc.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_desc.xls deleted file mode 100644 index a93f2d1d00f5c469c84e476b82264e5f35b7df95..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_desc.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_label.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_label.xls deleted file mode 100644 index 2920993c13829a6ef699a562d4d1df250ae36226..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_label.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_vocab_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_vocab_code.xls deleted file mode 100644 index 30f6effc706cf7eaa62952b3477469eedfda1a36..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/no_vocab_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/normal_property_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/normal_property_type.xls deleted file mode 100644 index b60b0d1af6c8bcc493e04f7ab025c2f30bcba1b4..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/normal_property_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabcode_when_not_vocabtype.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabcode_when_not_vocabtype.xls deleted file mode 100644 index 07b06775fb363a9c78ca6845927f0ce4d1baf16e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabcode_when_not_vocabtype.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabulary_detection.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabulary_detection.xls deleted file mode 100644 index 9dbed1010de4ae51769dcd5dc3f427bbcda4cc50..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/vocabulary_detection.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab.xls deleted file mode 100644 index c11888fc27960ed5f93d193e2d8e5c4e50e398e7..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab_on_server.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab_on_server.xls deleted file mode 100644 index 97378724a33e3c75a66a7e7b98343673fdd57991..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/property_types/with_vocab_on_server.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/no_code.xls deleted file mode 100644 index a20c2669d8420cc4f14dd1e7f570d97344fd8a0c..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples.xls deleted file mode 100644 index 26f1ce1b3d41182ad5ee0b16def5a35afd8ced4a..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples_v2.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples_v2.xls deleted file mode 100644 index 9ca2cccef1e90d0d169369dcb19e04e8a9584685..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/normal_samples_v2.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/vocabulary_detection.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/vocabulary_detection.xls deleted file mode 100644 index 778cead50ffb0439af049dfeed92324f4c52acd0..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/vocabulary_detection.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_auto_generated_codes.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_auto_generated_codes.xls deleted file mode 100644 index 53fa161043a304cc4b506dadc5cfdf6d61d88946..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_auto_generated_codes.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_dynamic_script.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_dynamic_script.xls deleted file mode 100644 index f6dbb88115880f4ff23e23dec6bb325db9b97573..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_dynamic_script.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_validation_script.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_validation_script.xls deleted file mode 100644 index 745fab798e0d9a94093918215080479a6a05e4ac..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_validation_script.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_in_xls.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_in_xls.xls deleted file mode 100644 index 513d56b4c83351e59f7a8de2a68cd54e80d1440e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_in_xls.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_on_server.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_on_server.xls deleted file mode 100644 index e8c32928586b43ab4803e601408e4eb45812fb5e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/sample_types/with_vocabulary_on_server.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_elsewhere.xls deleted file mode 100644 index 4749694789683c3bc418946c887fd6671f9aa1f1..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_in.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_in.xls deleted file mode 100644 index 148abc66a5cecb7ce20d395899f58cf68a64cc76..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/all_in.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment.xls deleted file mode 100644 index c9ab2810593b69711331702f3e2c081581b8db4e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment_type.xls deleted file mode 100644 index 90d5b40a5dc26d4c7861e4027493d63056f0d1c7..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/experiment_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/project.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/project.xls deleted file mode 100644 index 8a075fdf2f6f5907ebc85b2e42fadd5d2c89f402..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/project.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type.xls deleted file mode 100644 index 191b054327cd829c1b497f5492c02fbcb6748811..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type_elsewhere.xls deleted file mode 100644 index cae6691312385b98caa13d04e59a18f8ef0b5350..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/sample_type_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space.xls deleted file mode 100644 index 7184089ea5a51ad491f02f3940e0bb33c3f2eceb..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_elsewhere.xls deleted file mode 100644 index 684cfcf3e39a832f8176340492c62e97ee867d78..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_project_experiment_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_project_experiment_elsewhere.xls deleted file mode 100644 index 174b541bb4a23cf4dac1dc2a987577974f2216e6..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/space_project_experiment_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type.xls deleted file mode 100644 index 2798f91d6081a200fa1521726e8f466b37d23e26..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type_elsewhere.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type_elsewhere.xls deleted file mode 100644 index 4deec4455c64c7895f2864a6667ca3199b40a326..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/vocab_type_elsewhere.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code.xls deleted file mode 100644 index 56c21ac4eb5641ff8eaad5dd6db6e88e0714c1bb..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code_but_with$.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code_but_with$.xls deleted file mode 100644 index 744ae3ea4b84432acbd15f1a7e5aadac5c906a11..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_ambiguous_code_but_with$.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_child.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_child.xls deleted file mode 100644 index 71c45c3e02b29a2cab48e9234eaad90ab5fe20b6..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_child.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_parent.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_parent.xls deleted file mode 100644 index a63d1b6c4e297640462f3c241d2bd900843f84b2..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/samples/with_no_such_parent.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_code.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_code.xls deleted file mode 100644 index 66b359e91807e8236803f18014f10d6065b2a41f..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_code.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_desc.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_desc.xls deleted file mode 100644 index bd91bf15e2faa913d5ba3585a2e2038795e577b9..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/no_desc.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/normal_spaces.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/normal_spaces.xls deleted file mode 100644 index 13967a518d6a7491eac13ef97c2e23f603e7a738..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/spaces/normal_spaces.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/normal_vocab.xls b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/normal_vocab.xls deleted file mode 100644 index 1012b0c10cbb0b0a2126c01bc9e51634840bb300..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/normal_vocab.xls and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_code.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_code.xlsx deleted file mode 100644 index 327e9952a7cc9b025bb491abb3faf88c9b28fcc2..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_code.xlsx and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_desc.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_desc.xlsx deleted file mode 100644 index 63cbf942b4efa579282c864e0ad1ae76b120c050..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_desc.xlsx and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_code.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_code.xlsx deleted file mode 100644 index 78d4d0ce9a6fee95cc7686ef661d0627926ddd8b..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_code.xlsx and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_desc.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_desc.xlsx deleted file mode 100644 index dff69ee861ac7fce118e6b72243bcdd629aa709b..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_desc.xlsx and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_label.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_label.xlsx deleted file mode 100644 index db47fe26e67e19819b649ee6b27cdfc9b91c2e00..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_term_label.xlsx and /dev/null differ diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_terms.xlsx b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_terms.xlsx deleted file mode 100644 index 0fa1b978f1ca7eae53c5d2108de04333e6d3dc3e..0000000000000000000000000000000000000000 Binary files a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/plugin/excelimport/test_files/vocabularies/vocab_no_terms.xlsx and /dev/null differ