public abstract class AbstractCheckstyleTestCase
extends org.apache.maven.plugin.testing.AbstractMojoTestCase
Constructor and Description |
---|
AbstractCheckstyleTestCase() |
Modifier and Type | Method and Description |
---|---|
protected CheckstyleReport |
createReportMojo(String goal,
File pluginXmlFile) |
protected File |
generateReport(CheckstyleReport mojo,
File pluginXmlFile) |
protected File |
generateReport(String goal,
String pluginXml)
Generate the report and return the generated file
|
protected File |
getGeneratedReport(String name)
Get the generated report as file in the test maven project.
|
protected org.apache.maven.project.MavenProject |
getTestMavenProject()
Get the current Maven project
|
protected String |
readFile(File checkstyleTestDir,
String fileName)
Read the contents of the specified file object into a string
|
protected void |
setUp() |
protected void |
tearDown() |
addGuiceModules, configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getContainer, getPluginDescriptorLocation, getPluginDescriptorPath, getPublicDescriptorStream, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupConfiguredMojo, lookupConfiguredMojo, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, newMavenSession, newMojoExecution, setupContainer, setupContainerConfiguration, setVariableValueToObject
customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfigurationName, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, teardownContainer
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
protected void setUp() throws Exception
setUp
in class org.apache.maven.plugin.testing.AbstractMojoTestCase
Exception
protected void tearDown() throws Exception
tearDown
in class org.codehaus.plexus.PlexusTestCase
Exception
protected org.apache.maven.project.MavenProject getTestMavenProject()
protected File getGeneratedReport(String name) throws IOException
name
- the name of the report.IOException
- if the return file doesnt existprotected File generateReport(String goal, String pluginXml) throws Exception
goal
- the mojo goal.pluginXml
- the name of the xml file in "src/test/resources/plugin-configs/".Exception
- if anyprotected CheckstyleReport createReportMojo(String goal, File pluginXmlFile) throws Exception
Exception
protected File generateReport(CheckstyleReport mojo, File pluginXmlFile) throws Exception
Exception
protected String readFile(File checkstyleTestDir, String fileName) throws IOException
IOException
Copyright © 2005–2023 The Apache Software Foundation. All rights reserved.