Skip to content
Snippets Groups Projects
Commit 38545175 authored by felmer's avatar felmer
Browse files

SE-246 DatasetDescription refactored

SVN: 15883
parent 8c4e50b9
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,14 @@ public class AbstractFileTableReportingPluginTest extends AssertJUnit ...@@ -98,6 +98,14 @@ public class AbstractFileTableReportingPluginTest extends AssertJUnit
private DatasetDescription createDataSetDescription() private DatasetDescription createDataSetDescription()
{ {
return new DatasetDescription("Cod", "Loc", "Sam", "Spa", "Pro", "Exp", null, null, "Ins"); DatasetDescription description = new DatasetDescription();
description.setDatasetCode("Cod");
description.setDataSetLocation("Loc");
description.setSampleCode("Sam");
description.setGroupCode("Spa");
description.setProjectCode("Pro");
description.setExperimentCode("Exp");
description.setDatabaseInstanceCode("Ins");
return description;
} }
} }
...@@ -98,7 +98,14 @@ public class DataSetCopierForUsersTest extends AbstractFileSystemTestCase ...@@ -98,7 +98,14 @@ public class DataSetCopierForUsersTest extends AbstractFileSystemTestCase
properties = new Properties(); properties = new Properties();
properties.setProperty("ssh-executable", sshExecutableDummy.getPath()); properties.setProperty("ssh-executable", sshExecutableDummy.getPath());
properties.setProperty("rsync-executable", rsyncExecutableDummy.getPath()); properties.setProperty("rsync-executable", rsyncExecutableDummy.getPath());
ds = new DatasetDescription("ds1", DS_LOCATION, "s", "g", "p", "e", null, null, "i"); ds = new DatasetDescription();
ds.setDatasetCode("ds1");
ds.setDataSetLocation(DS_LOCATION);
ds.setSampleCode("s");
ds.setGroupCode("g");
ds.setProjectCode("p");
ds.setExperimentCode("e");
ds.setDatabaseInstanceCode("i");
File ds1Folder = new File(storeRoot, DS_LOCATION + "/original"); File ds1Folder = new File(storeRoot, DS_LOCATION + "/original");
ds1Folder.mkdirs(); ds1Folder.mkdirs();
dsData = new File(ds1Folder, "data.txt"); dsData = new File(ds1Folder, "data.txt");
......
...@@ -107,27 +107,40 @@ public class DataSetCopierTest extends AbstractFileSystemTestCase ...@@ -107,27 +107,40 @@ public class DataSetCopierTest extends AbstractFileSystemTestCase
properties = new Properties(); properties = new Properties();
properties.setProperty("ssh-executable", sshExecutableDummy.getPath()); properties.setProperty("ssh-executable", sshExecutableDummy.getPath());
properties.setProperty("rsync-executable", rsyncExecutableDummy.getPath()); properties.setProperty("rsync-executable", rsyncExecutableDummy.getPath());
ds1 = new DatasetDescription("ds1", DS1_LOCATION, "s", "g", "p", "e", null, null, "i"); ds1 = createDataSetDescription("ds1", DS1_LOCATION);
File ds1Folder = new File(storeRoot, DS1_LOCATION + "/original"); File ds1Folder = new File(storeRoot, DS1_LOCATION + "/original");
ds1Folder.mkdirs(); ds1Folder.mkdirs();
ds1Data = new File(ds1Folder, "data.txt"); ds1Data = new File(ds1Folder, "data.txt");
ds1Data.createNewFile(); ds1Data.createNewFile();
ds2 = new DatasetDescription("ds2", DS2_LOCATION, "s", "g", "p", "e", null, null, "i"); ds2 = createDataSetDescription("ds2", DS2_LOCATION);
File ds2Folder = new File(storeRoot, DS2_LOCATION + "/original"); File ds2Folder = new File(storeRoot, DS2_LOCATION + "/original");
ds2Folder.mkdirs(); ds2Folder.mkdirs();
ds2Data = new File(ds2Folder, "images"); ds2Data = new File(ds2Folder, "images");
ds2Data.mkdirs(); ds2Data.mkdirs();
ds3 = new DatasetDescription("ds3", DS3_LOCATION, "s", "g", "p", "e", null, null, "i"); ds3 = createDataSetDescription("ds3", DS3_LOCATION);
File ds3Folder = new File(storeRoot, DS3_LOCATION + "/original"); File ds3Folder = new File(storeRoot, DS3_LOCATION + "/original");
ds3Folder.mkdirs(); ds3Folder.mkdirs();
ds3Data = new File(ds3Folder, "existing"); ds3Data = new File(ds3Folder, "existing");
ds3Data.createNewFile(); ds3Data.createNewFile();
ds4 = new DatasetDescription("ds4", DS4_LOCATION, "s", "g", "p", "e", null, null, "i"); ds4 = createDataSetDescription("ds4", DS4_LOCATION);
File ds4Folder = new File(storeRoot, DS4_LOCATION + "/original"); File ds4Folder = new File(storeRoot, DS4_LOCATION + "/original");
ds4Folder.mkdirs(); ds4Folder.mkdirs();
ds4Data = new File(ds4Folder, "existing"); ds4Data = new File(ds4Folder, "existing");
ds4Data.mkdirs(); ds4Data.mkdirs();
} }
private DatasetDescription createDataSetDescription(String dataSetCode, String location)
{
DatasetDescription description = new DatasetDescription();
description.setDatasetCode(dataSetCode);
description.setDataSetLocation(location);
description.setDatabaseInstanceCode("i");
description.setGroupCode("g");
description.setProjectCode("p");
description.setExperimentCode("e");
description.setSampleCode("s");
return description;
}
@AfterMethod @AfterMethod
public void afterMethod() public void afterMethod()
......
...@@ -95,7 +95,9 @@ public class MergedColumnDataReportingPluginTest extends AssertJUnit ...@@ -95,7 +95,9 @@ public class MergedColumnDataReportingPluginTest extends AssertJUnit
private DatasetDescription createDatasetDescription(String location) private DatasetDescription createDatasetDescription(String location)
{ {
return new DatasetDescription("", location, "", "", "", "", null, null, ""); DatasetDescription description = new DatasetDescription();
description.setDataSetLocation(location);
return description;
} }
} }
...@@ -100,8 +100,15 @@ public class IterativeTableModelBuilderTest ...@@ -100,8 +100,15 @@ public class IterativeTableModelBuilderTest
private DatasetDescription createDatasetDescription() private DatasetDescription createDatasetDescription()
{ {
return new DatasetDescription("code", "location", "sampleCode", "groupCode", "projCode", DatasetDescription description = new DatasetDescription();
"expCode", null, null, "instance"); description.setDatasetCode("code");
description.setDataSetLocation("location");
description.setSampleCode("sampleCode");
description.setGroupCode("groupCode");
description.setProjectCode("projCode");
description.setExperimentCode("expCode");
description.setDatabaseInstanceCode("instance");
return description;
} }
@Test @Test
......
...@@ -140,8 +140,15 @@ public class PluginTaskParametersTest extends AbstractFileSystemTestCase ...@@ -140,8 +140,15 @@ public class PluginTaskParametersTest extends AbstractFileSystemTestCase
private static List<DatasetDescription> createDatasetDescriptions() private static List<DatasetDescription> createDatasetDescriptions()
{ {
return Arrays.asList(new DatasetDescription(".", "3123123123-123", "sampleCode", DatasetDescription description = new DatasetDescription();
"groupCode", "projCode", "expCode", null, null, "instance")); description.setDatasetCode(".");
description.setDataSetLocation("3123123123-123");
description.setSampleCode("sampleCode");
description.setGroupCode("groupCode");
description.setProjectCode("projCode");
description.setExperimentCode("expCode");
description.setDatabaseInstanceCode("instance");
return Arrays.asList(description);
} }
private void putPluginProperties(Properties props, String pluginId, String pluginLabel, private void putPluginProperties(Properties props, String pluginId, String pluginLabel,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment