Class PythonCompileTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.apache.maven.plugin.testing.AbstractMojoTestCase
test.de.iip_ecosphere.platform.tools.maven.python.AbstractTest
test.de.iip_ecosphere.platform.tools.maven.python.PythonCompileTest
- All Implemented Interfaces:
junit.framework.Test
Test for
PythonCompileMojo.- Author:
- Holger Eichelberger, SSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertMd5File(de.iip_ecosphere.platform.tools.maven.python.PythonCompileMojo mojo) Asserts the MD5 file existence.private static voidcleanMd5File(boolean clean, de.iip_ecosphere.platform.tools.maven.python.PythonCompileMojo mojo) Cleans the MD5 file if requested.protected voidsetUp()protected voidtearDown()voidtestFail()Tests the Python compile plugin (erroneous project).private voidtestFail(boolean cleanFirst) Tests the Python compile plugin (erroneous project).voidtestOk()Tests the Python compile plugin (project ok).private voidtestOk(boolean cleanFirst) Tests the Python compile plugin (project ok).Methods inherited from class test.de.iip_ecosphere.platform.tools.maven.python.AbstractTest
readMavenProjectMethods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
addGuiceModules, configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getContainer, getPluginDescriptorLocation, getPluginDescriptorPath, getPublicDescriptorStream, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupConfiguredMojo, lookupConfiguredMojo, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, newMavenSession, newMojoExecution, setupContainer, setupContainerConfiguration, setVariableValueToObjectMethods inherited from class org.codehaus.plexus.PlexusTestCase
customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfigurationName, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, teardownContainerMethods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
PythonCompileTest
public PythonCompileTest()
-
-
Method Details
-
setUp
- Overrides:
setUpin classorg.apache.maven.plugin.testing.AbstractMojoTestCase- Throws:
Exception
-
tearDown
- Overrides:
tearDownin classorg.codehaus.plexus.PlexusTestCase- Throws:
Exception
-
testOk
Tests the Python compile plugin (project ok).- Throws:
Exception- if the test fails
-
testOk
Tests the Python compile plugin (project ok).- Parameters:
cleanFirst- get rid of MD5 file before the test- Throws:
Exception- if the test fails
-
testFail
Tests the Python compile plugin (erroneous project).- Throws:
Exception- if the test fails
-
testFail
Tests the Python compile plugin (erroneous project).- Parameters:
cleanFirst- get rid of MD5 file before the test- Throws:
Exception- if the test fails
-
assertMd5File
private static void assertMd5File(de.iip_ecosphere.platform.tools.maven.python.PythonCompileMojo mojo) Asserts the MD5 file existence.- Parameters:
mojo- instance carrying the MD5 file
-
cleanMd5File
private static void cleanMd5File(boolean clean, de.iip_ecosphere.platform.tools.maven.python.PythonCompileMojo mojo) Cleans the MD5 file if requested.- Parameters:
clean- to clean or not cleanmojo- instance carrying the MD5 file
-