diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5ed0cb95beb32e230208526a850ba7ecc4b219fd Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..e443228f882448234de6fe18bf4f5e87c13ec442 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..51eb829078b9c95c68fd404916dc0029a1afd035 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_01_GFP.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..a063b41d48675a4a6cf0cc85f11dbff94d450a64 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..d150319c21666f40b6e48808096c3f88c8749d58 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3e1443c3ced183528919d464346511743a91fa2d Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_02_GFP.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2b1d50d22997faed0d68174cb6521f6e43e947eb Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1a929ee27f7a6ebae493b6aa48c5b5838ce7be74 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1d0a36b1ae5a1e2364acb5a81b8d1646ee9ec880 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_03_GFP.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2fdf43adb9f6088dcec25443f9fd31b741c99588 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..fc0839c77b2164ba29a898e2ec27ed57d909d8f7 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..9634af8f73b3b838c90385882431d8289af77c1e Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_04_GFP.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f115cb5caa837bb85547c5504e5ee50b44079d40 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2c98179049a60b710fee006659070d79b58d0096 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3128a5bb435748e2abf9ddaedd0618db2b2d3f47 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_05_GFP.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_Cy3.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_Cy3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c8cad6f59f16d8bffb5309957e1b55443aaca63a Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_Cy3.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_DAPI.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_DAPI.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1e64bf3291bce3140a2933706fd11691e65b3969 Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_DAPI.jpg differ diff --git a/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_GFP.jpg b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_GFP.jpg new file mode 100755 index 0000000000000000000000000000000000000000..d0478cb59f15e8e2b2f5a26b6505d452f2a0b51a Binary files /dev/null and b/screening/resource/test-data/MiscellaneousDropBoxApiV2FeaturesTest/PLATE1/PLATE1_A01_06_GFP.jpg differ diff --git a/screening/source/java/ch/systemsx/cisd/openbis/dss/etl/jython/SimpleImageDataSetRegistrator.java b/screening/source/java/ch/systemsx/cisd/openbis/dss/etl/jython/SimpleImageDataSetRegistrator.java index f22766dcd323a7cdc9946cb13d07899a22e53f58..4ab4ab7905eef383e653d87d457642b6cc72078a 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/dss/etl/jython/SimpleImageDataSetRegistrator.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/dss/etl/jython/SimpleImageDataSetRegistrator.java @@ -163,14 +163,18 @@ public class SimpleImageDataSetRegistrator imageDatasetFactory.createDataSetRegistrationDetails(); ImageDataSetInformation imageDataset = registrationDetails.getDataSetInformation(); setImageDataset(incoming, imageDataset); - List<ChannelColorComponent> channelColorComponentsOrNull = - simpleImageConfig.getChannelColorComponentsOrNull(); - if (channelColorComponentsOrNull == null) + List<Channel> channels = simpleImageConfig.getChannels(); + if (channels != null) { - imageDataset.setChannels(simpleImageConfig.getChannels()); - } else - { - imageDataset.setChannels(simpleImageConfig.getChannels(), channelColorComponentsOrNull); + List<ChannelColorComponent> channelColorComponentsOrNull = + simpleImageConfig.getChannelColorComponentsOrNull(); + if (channelColorComponentsOrNull == null) + { + imageDataset.setChannels(channels); + } else + { + imageDataset.setChannels(channels, channelColorComponentsOrNull); + } } setRegistrationDetails(registrationDetails, imageDataset); return registrationDetails; diff --git a/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/data-set-handler.py b/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/data-set-handler.py new file mode 100644 index 0000000000000000000000000000000000000000..8bb3826f3bb12ef8ee87eb12787ac67884b7bd8f --- /dev/null +++ b/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/data-set-handler.py @@ -0,0 +1,87 @@ +import os +from ch.systemsx.cisd.openbis.dss.etl.dto.api.v1 import SimpleImageDataConfig +from ch.systemsx.cisd.openbis.dss.etl.dto.api.v1 import ImageMetadata +from ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto import Geometry + +SPACE_CODE = "TEST" +PROJECT_CODE = "TEST-PROJECT" +PROJECT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s" % vars() +EXPERIMENT_CODE = "TEST-EXP-HCS" +EXPERIMENT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s/%(EXPERIMENT_CODE)s" % vars() + +PLATE_CODE = "PLATE1" +PLATE_ID = "/%(SPACE_CODE)s/%(PLATE_CODE)s" % vars() +PLATE_GEOMETRY_PROPERTY_CODE = "$PLATE_GEOMETRY" + + +def create_space_if_needed(transaction): + space = transaction.getSpace(SPACE_CODE) + if None == space: + space = transaction.createNewSpace(SPACE_CODE, None) + space.setDescription("A demo space") + +def create_project_if_needed(transaction): + project = transaction.getProject(PROJECT_ID) + if None == project: + create_space_if_needed(transaction) + project = transaction.createNewProject(PROJECT_ID) + project.setDescription("A demo project") + +def create_experiment_if_needed(transaction): + """ Get the specified experiment or register it if necessary """ + exp = transaction.getExperiment(EXPERIMENT_ID) + if None == exp: + create_project_if_needed(transaction) + print 'Creating new experiment : ' + EXPERIMENT_ID + exp = transaction.createNewExperiment(EXPERIMENT_ID, 'SIRNA_HCS') + exp.setPropertyValue("DESCRIPTION", "A sample experiment") + + return exp + +def create_plate_if_needed(transaction): + """ Get the specified sample or register it if necessary """ + + samp = transaction.getSample(PLATE_ID) + + if None == samp: + exp = create_experiment_if_needed(transaction) + samp = transaction.createNewSample(PLATE_ID, 'PLATE') + samp.setPropertyValue(PLATE_GEOMETRY_PROPERTY_CODE, "384_WELLS_16X24") + samp.setExperiment(exp) + + return samp + + +class MyImageDataSetConfig(SimpleImageDataConfig): + def extractImageMetadata(self, imagePath): + + basename = os.path.splitext(imagePath)[0] + (plate, well, tile, channelCode) = basename.split("_") + + image_tokens = ImageMetadata() + image_tokens.well = well + try: + image_tokens.tileNumber = int(tile) + except ValueError: + raise Exception("Cannot parse field number from '" + tile + "' in '" + basename + "' file name.") + + image_tokens.channelCode = channelCode + return image_tokens + + def getTileGeometry(self, imageTokens, maxTileNumber): + return Geometry.createFromRowColDimensions(maxTileNumber / 3, 3) + +def process(transaction): + incoming = transaction.getIncoming() + if incoming.isDirectory(): + imageDataset = MyImageDataSetConfig() + imageDataset.setRawImageDatasetType() + imageDataset.setGenerateThumbnails(True) + imageDataset.setUseImageMagicToGenerateThumbnails(False) + imageDataset.setPlate(SPACE_CODE, PLATE_CODE) + dataset = transaction.createNewImageDataSet(imageDataset, incoming); + plate = create_plate_if_needed(transaction) + plateGeometry = dataset.figureGeometry() + plate.setPropertyValue(PLATE_GEOMETRY_PROPERTY_CODE, plateGeometry) + dataset.setSample(plate) + transaction.moveFile(incoming.getPath(), dataset); diff --git a/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/plugin.properties b/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..1e7a5a4bbf727102249de8432d2fafafb84018d9 --- /dev/null +++ b/screening/sourceTest/core-plugins/MiscellaneousDropBoxApiV2FeaturesTest/1/dss/drop-boxes/MiscellaneousDropBoxApiV2FeaturesTest-drop-box/plugin.properties @@ -0,0 +1,7 @@ +incoming-dir = ${root-dir}/incoming-MiscellaneousDropBoxApiV2FeaturesTest +incoming-dir-create = true +incoming-data-completeness-condition = auto-detection +top-level-data-set-handler = ch.systemsx.cisd.openbis.dss.etl.jython.v2.JythonPlateDataSetHandlerV2 +script-path = data-set-handler.py +storage-processor = ch.systemsx.cisd.openbis.dss.etl.PlateStorageProcessor +storage-processor.data-source = imaging-db \ No newline at end of file diff --git a/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/MiscellaneousDropBoxApiV2FeaturesTest.java b/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/MiscellaneousDropBoxApiV2FeaturesTest.java new file mode 100644 index 0000000000000000000000000000000000000000..42935e802eec20ea8a215d1f81f09c79cf607808 --- /dev/null +++ b/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/MiscellaneousDropBoxApiV2FeaturesTest.java @@ -0,0 +1,165 @@ +/* + * Copyright 2012 ETH Zuerich, CISD + * + * 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.systemsx.cisd.openbis.screening.systemtests; + +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.mock.web.MockHttpServletRequest; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import ch.systemsx.cisd.common.filesystem.FileUtilities; +import ch.systemsx.cisd.common.servlet.SpringRequestContextProvider; +import ch.systemsx.cisd.openbis.generic.shared.ICommonServer; +import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListSampleCriteria; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; +import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifierFactory; +import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientService; +import ch.systemsx.cisd.openbis.plugin.screening.shared.IScreeningServer; +import ch.systemsx.cisd.openbis.plugin.screening.shared.ResourceNames; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.DatasetImagesReference; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ImageDatasetEnrichedReference; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ImageResolution; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.PlateContent; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.PlateMetadata; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellMetadata; + +/** + * + * + * @author Franz-Josef Elmer + */ +@Test(groups = + { "slow", "systemtest" }) +public class MiscellaneousDropBoxApiV2FeaturesTest extends AbstractScreeningSystemTestCase +{ + private MockHttpServletRequest request; + private String sessionToken; + + private ICommonServer commonServer; + private IScreeningClientService screeningClientService; + private IScreeningServer screeningServer; + + @BeforeTest + public void dropAnExampleDataSet() throws IOException, Exception + { + File exampleDataSet = createTestDataContents(); + moveFileToIncoming(exampleDataSet); + waitUntilDataSetImported(); + } + + @BeforeMethod + public void setUp() throws Exception + { + commonServer = + (ICommonServer) applicationContext + .getBean(ch.systemsx.cisd.openbis.generic.shared.ResourceNames.COMMON_SERVER); + screeningClientService = + (IScreeningClientService) applicationContext + .getBean(ResourceNames.SCREENING_PLUGIN_SERVICE); + request = new MockHttpServletRequest(); + ((SpringRequestContextProvider) applicationContext.getBean("request-context-provider")) + .setRequest(request); + Object bean = applicationContext.getBean(ResourceNames.SCREENING_PLUGIN_SERVER); + screeningServer = (IScreeningServer) bean; + sessionToken = screeningClientService.tryToLogin("admin", "a").getSessionID(); + } + + @AfterMethod + public void tearDown() + { + File[] files = getIncomingDirectory().listFiles(); + for (File file : files) + { + FileUtilities.deleteRecursively(file); + } + } + + @Test + public void testSettingPlateGeometryByFigureGeometry() + { + Experiment experiment = + commonServer.getExperimentInfo(sessionToken, + ExperimentIdentifierFactory.parse("/TEST/TEST-PROJECT/TEST-EXP-HCS")); + List<Sample> samples = + commonServer.listSamples(sessionToken, + ListSampleCriteria.createForExperiment(new TechId(experiment.getId()))); + + Sample sample = samples.get(0); + assertEquals("/TEST/PLATE1", sample.getIdentifier()); + assertEquals("[$PLATE_GEOMETRY: 24_WELLS_4X6]", sample.getProperties().toString()); + assertEquals(1, samples.size()); + } + + @Test + public void testImageResolutions() + { + Experiment experiment = + commonServer.getExperimentInfo(sessionToken, + ExperimentIdentifierFactory.parse("/TEST/TEST-PROJECT/TEST-EXP-HCS")); + List<Sample> samples = + commonServer.listSamples(sessionToken, + ListSampleCriteria.createForExperiment(new TechId(experiment.getId()))); + Sample sample = samples.get(0); + + PlateContent plateContent = screeningServer.getPlateContent(sessionToken, new TechId(sample.getId())); + + PlateMetadata plateMetadata = plateContent.getPlateMetadata(); + assertEquals(4, plateMetadata.getRowsNum()); + assertEquals(6, plateMetadata.getColsNum()); + assertEquals(0, plateMetadata.getWells().size()); + List<ImageDatasetEnrichedReference> imageDatasets = plateContent.getImageDatasets(); + DatasetImagesReference imageDataset = imageDatasets.get(0).getImageDataset(); + assertEquals("/TEST/TEST-PROJECT/TEST-EXP-HCS", imageDataset.getDatasetReference().getExperimentIdentifier()); + assertEquals(1, imageDatasets.size()); + List<ImageResolution> imageDatasetResolutions = + screeningServer.getImageDatasetResolutions(sessionToken, + imageDataset.getDatasetCode(), imageDataset.getDatastoreCode()); + Collections.sort(imageDatasetResolutions); + assertEquals("[256x191, 1392x1040]", imageDatasetResolutions.toString()); + } + + private File createTestDataContents() throws IOException + { + File dest = new File(workingDirectory, "TEST-PLATE1"); + dest.mkdirs(); + File src = new File(getTestDataFolder(), "PLATE1"); + + // Copy the test data set to the location for processing + FileUtils.copyDirectory(src, dest); + return dest; + } + + private String getTestDataFolder() + { + return "../screening/resource/test-data/" + getClass().getSimpleName() + "/"; + } + + @Override + protected int dataSetImportWaitDurationInSeconds() + { + return 60; + } +}