Class LoaderTest
java.lang.Object
test.de.iip_ecosphere.platform.services.spring.loader.LoaderTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate FiledeleteTestFile(String name) Deletes the test file in temp.private intstartAndWaitFor(ProcessBuilder builder) Starts the process described bybuilder, attaches aStreamGobbler, waits for it and returns the exit value.voidTests the loader with original Spring packaging.voidTests the loader with original Zip packaging.voidTests the loader with split Spring packaging (plugin).voidTests the loader with split Zip packaging (plugin).private voidtestSpring(File jar, String appName) Tests Spring packaging by starting as JAR.private voidTests ZIP file packaging by extracting and starting using the main classpath.
-
Constructor Details
-
LoaderTest
public LoaderTest()
-
-
Method Details
-
deleteTestFile
Deletes the test file in temp.- Parameters:
name- the file name- Returns:
- the test file object
- Throws:
IOException- if deleting fails
-
testLoader_originalZipPackaging
public void testLoader_originalZipPackaging() throws IOException, ExecutionException, InterruptedExceptionTests the loader with original Zip packaging.- Throws:
IOException- if I/O failsExecutionExceptionInterruptedException
-
testLoader_splitZipPackaging
public void testLoader_splitZipPackaging() throws IOException, ExecutionException, InterruptedExceptionTests the loader with split Zip packaging (plugin).- Throws:
IOException- if I/O failsExecutionExceptionInterruptedException
-
testLoader_originalSpringPackaging
public void testLoader_originalSpringPackaging() throws IOException, ExecutionException, InterruptedExceptionTests the loader with original Spring packaging.- Throws:
IOException- if I/O failsExecutionExceptionInterruptedException
-
testLoader_splitSpringPackaging
Tests the loader with split Spring packaging (plugin).- Throws:
IOException- if I/O fails
-
testZip
Tests ZIP file packaging by extracting and starting using the main classpath.- Throws:
IOException- if I/O fails
-
testSpring
Tests Spring packaging by starting as JAR.- Throws:
IOException- if I/O fails
-
startAndWaitFor
Starts the process described bybuilder, attaches aStreamGobbler, waits for it and returns the exit value.- Parameters:
builder- the builder- Returns:
- the exit value
- Throws:
IOException- if creating the process fails
-