Package org.wildfly.plugin.tests
Class AbstractWildFlyMojoTest
java.lang.Object
org.wildfly.plugin.tests.AbstractWildFlyMojoTest
- Direct Known Subclasses:
AbstractWildFlyServerMojoTest
- Author:
- James R. Perkins
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Pathprotected org.wildfly.plugin.tools.DeploymentReturns the deployment test.war from the test resources.static PathgetPomFile(String fileName) <T extends org.apache.maven.plugin.Mojo>
TlookupMojoAndVerify(String goal, String fileName) Configures a MOJO based on the goal and the pom file then verifies the goal MOJO was found.org.apache.maven.project.MavenProjectreadMavenProject(Path pom) protected static voidsetDefaultEnvironment(org.apache.maven.plugin.Mojo instance) protected static voidsetValidSession(org.apache.maven.plugin.Mojo mojo) protected static void
-
Field Details
-
DEPLOYMENT_NAME
- See Also:
-
BASE_CONFIG_DIR
-
rule
public org.apache.maven.plugin.testing.MojoRule rule
-
-
Constructor Details
-
AbstractWildFlyMojoTest
public AbstractWildFlyMojoTest()
-
-
Method Details
-
getDeployment
protected org.wildfly.plugin.tools.Deployment getDeployment()Returns the deployment test.war from the test resources.- Returns:
- the deployment
-
lookupMojoAndVerify
public <T extends org.apache.maven.plugin.Mojo> T lookupMojoAndVerify(String goal, String fileName) throws Exception Configures a MOJO based on the goal and the pom file then verifies the goal MOJO was found.- Parameters:
goal- the name of the goal being testedfileName- the name of the POM file to be used during testing- Returns:
- the MOJO object under test
- Throws:
AssertionError- if the MOJO was not foundException
-
getPomFile
-
getBaseDir
-
readMavenProject
- Throws:
Exception
-
setDefaultEnvironment
protected static void setDefaultEnvironment(org.apache.maven.plugin.Mojo instance) throws NoSuchFieldException, IllegalAccessException -
setValue
protected static void setValue(Object instance, String name, Object value) throws NoSuchFieldException, IllegalAccessException -
setValidSession
protected static void setValidSession(org.apache.maven.plugin.Mojo mojo) throws org.eclipse.aether.repository.NoLocalRepositoryManagerException, NoSuchFieldException, IllegalAccessException - Throws:
org.eclipse.aether.repository.NoLocalRepositoryManagerExceptionNoSuchFieldExceptionIllegalAccessException
-