public abstract class AbstractEarPluginIT
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
protected String |
FINAL_NAME_PREFIX |
protected String |
FINAL_NAME_SUFFIX |
protected File |
localRepositoryDir
Test repository directory.
|
protected File |
settingsFile |
Constructor and Description |
---|
AbstractEarPluginIT() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertArchiveContent(File baseDir,
String projectName,
String[] artifactNames,
boolean[] artifactsDirectory) |
protected void |
assertDeploymentDescriptors(File baseDir,
String projectName)
Asserts that the deployment descriptors have been generated successfully.
|
protected void |
assertEarArchive(File baseDir,
String projectName) |
protected void |
assertEarDirectory(File baseDir,
String projectName) |
protected List<File> |
buildArchiveContentFiles(File baseDir,
List<File> expectedDirectories) |
protected String |
buildFinalName(String projectName) |
protected File |
doTestProject(String projectName,
String[] expectedArtifacts)
Executes the specified projects and asserts the given artifacts as artifacts (non directory).
|
protected File |
doTestProject(String projectName,
String[] expectedArtifacts,
boolean testDeploymentDescriptors)
Executes the specified projects and asserts the given artifacts as artifacts (non directory)
|
protected File |
doTestProject(String projectName,
String[] expectedArtifacts,
boolean[] artifactsDirectory)
Executes the specified projects and asserts the given artifacts.
|
protected File |
executeMojo(String projectName,
Properties properties)
Execute the EAR plugin for the specified project.
|
protected File |
executeMojo(String projectName,
Properties properties,
boolean expectNoError)
Execute the EAR plugin for the specified project.
|
protected File |
getBasedir() |
protected File |
getEarArchive(File baseDir,
String projectName) |
protected File |
getEarDirectory(File baseDir,
String projectName) |
protected File |
getTargetDirectory(File basedir) |
protected File |
getTestDir(String projectName) |
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, setUp, tearDown, toString
protected final String FINAL_NAME_PREFIX
protected final String FINAL_NAME_SUFFIX
protected File localRepositoryDir
protected File settingsFile
protected File executeMojo(String projectName, Properties properties, boolean expectNoError) throws Exception
projectName
- the name of the projectproperties
- extra properties to be used by the embedderexpectNoError
- true/flase.Exception
- if an error occurredprotected File executeMojo(String projectName, Properties properties) throws Exception
projectName
- the name of the projectproperties
- extra properties to be used by the embedderException
- if an error occurredprotected File doTestProject(String projectName, String[] expectedArtifacts, boolean[] artifactsDirectory) throws Exception
projectName
- the project to testexpectedArtifacts
- the list of artifacts to be found in the EAR archiveartifactsDirectory
- whether the artifact is an exploded artifactsDirectory or notException
- Mojo exception in case of an errorprotected File doTestProject(String projectName, String[] expectedArtifacts, boolean testDeploymentDescriptors) throws Exception
projectName
- the project to testexpectedArtifacts
- the list of artifacts to be found in the EAR archivetestDeploymentDescriptors
- whether we should test deployment descriptorsException
- Mojo exception in case of an error.protected File doTestProject(String projectName, String[] expectedArtifacts) throws Exception
projectName
- the project to testexpectedArtifacts
- the list of artifacts to be found in the EAR archiveException
- Mojo exception in case of an error.protected void assertArchiveContent(File baseDir, String projectName, String[] artifactNames, boolean[] artifactsDirectory)
protected List<File> buildArchiveContentFiles(File baseDir, List<File> expectedDirectories)
protected File getBasedir()
protected File getTestDir(String projectName) throws IOException
IOException
protected void assertDeploymentDescriptors(File baseDir, String projectName) throws IOException
baseDir
- the directory of the tested projectprojectName
- the name of the projectIOException
- exception in case of an error.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.