Skip to content
Snippets Groups Projects
Commit bbd1e101 authored by kaloyane's avatar kaloyane
Browse files

minor: changes related to the sanofi test

SVN: 21999
parent 7596623d
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste ...@@ -70,7 +70,7 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste
private static final String DATABASE_INSTANCE_UUID = "db-uuid"; private static final String DATABASE_INSTANCE_UUID = "db-uuid";
protected JythonTopLevelDataSetHandler<DataSetInformation> handler; protected JythonTopLevelDataSetHandler<? extends DataSetInformation> handler;
protected Mockery context; protected Mockery context;
...@@ -172,10 +172,10 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste ...@@ -172,10 +172,10 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste
handler = handler =
new TestingDataSetHandler(globalState, registrationShouldFail, new TestingDataSetHandler(globalState, registrationShouldFail,
shouldReThrowException); shouldReThrowException);
} }
private TopLevelDataSetRegistratorGlobalState createGlobalState(Properties threadProperties) protected TopLevelDataSetRegistratorGlobalState createGlobalState(Properties threadProperties)
{ {
ThreadParameters threadParameters = ThreadParameters threadParameters =
new ThreadParameters(threadProperties, "jython-handler-test"); new ThreadParameters(threadProperties, "jython-handler-test");
...@@ -253,14 +253,20 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste ...@@ -253,14 +253,20 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste
public void storeData(DataSetInformation dataSetInformation, public void storeData(DataSetInformation dataSetInformation,
ITypeExtractor typeExtractor, IMailClient mailClient, ITypeExtractor typeExtractor, IMailClient mailClient,
File incomingDataSetDirectory, File rootDir) File incomingDataSetFile, File rootDir)
{ {
incomingDirs.add(incomingDataSetDirectory); incomingDirs.add(incomingDataSetFile);
rootDirs.add(rootDir); rootDirs.add(rootDir);
dataSetInfoString = dataSetInformation.toString(); dataSetInfoString = dataSetInformation.toString();
try try
{ {
FileUtils.copyDirectory(incomingDataSetDirectory, rootDir); if (incomingDataSetFile.isDirectory())
{
FileUtils.copyDirectory(incomingDataSetFile, rootDir);
} else
{
FileUtils.copyFileToDirectory(incomingDataSetFile, rootDir);
}
} catch (IOException ex) } catch (IOException ex)
{ {
throw new IOExceptionUnchecked(ex); throw new IOExceptionUnchecked(ex);
......
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