-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SUREFIRE-2161] Align Mojo class names and output names
- Loading branch information
Showing
33 changed files
with
120 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
* @author <a href="mailto:[email protected]">Allan Ramirez</a> | ||
*/ | ||
@SuppressWarnings("checkstyle:linelength") | ||
public class SurefireReportMojoTest extends AbstractMojoTestCase { | ||
public class SurefireReportTest extends AbstractMojoTestCase { | ||
private ArtifactStubFactory artifactStubFactory; | ||
|
||
// Can be removed with Doxia 2.0.0 | ||
|
@@ -64,8 +64,8 @@ protected void tearDown() throws Exception { | |
super.tearDown(); | ||
} | ||
|
||
protected SurefireReportMojo createReportMojo(File pluginXmlFile) throws Exception { | ||
SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo("report", pluginXmlFile); | ||
protected SurefireReport createReportMojo(File pluginXmlFile) throws Exception { | ||
SurefireReport mojo = (SurefireReport) lookupMojo("report", pluginXmlFile); | ||
assertNotNull("Mojo found.", mojo); | ||
|
||
LegacySupport legacySupport = lookup(LegacySupport.class); | ||
|
@@ -82,7 +82,7 @@ protected SurefireReportMojo createReportMojo(File pluginXmlFile) throws Excepti | |
|
||
public void testBasicSurefireReport() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "basic-surefire-report-test/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); | ||
boolean showSuccess = (Boolean) getVariableValueFromObject(mojo, "showSuccess"); | ||
File reportsDir = (File) getVariableValueFromObject(mojo, "reportsDirectory"); | ||
|
@@ -96,14 +96,14 @@ public void testBasicSurefireReport() throws Exception { | |
new File(getBasedir() + "/src/test/resources/unit/basic-surefire-report-test/surefire-reports") | ||
.getAbsolutePath(), | ||
reportsDir.getAbsolutePath()); | ||
assertEquals("surefire-report", outputName); | ||
assertEquals("surefire", outputName); | ||
assertEquals( | ||
new File(getBasedir() + "/target/site/unit/basic-surefire-report-test/xref-test").getAbsolutePath(), | ||
xrefLocation.getAbsolutePath()); | ||
assertTrue(linkXRef); | ||
|
||
mojo.execute(); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-test/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-test/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -119,12 +119,11 @@ private File getUnitBaseDir() throws UnsupportedEncodingException { | |
|
||
public void testBasicSurefireReportIfShowSuccessIsFalse() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "basic-surefire-report-success-false/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
boolean showSuccess = (Boolean) getVariableValueFromObject(mojo, "showSuccess"); | ||
assertFalse(showSuccess); | ||
mojo.execute(); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/basic-surefire-report-success-false/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-success-false/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -134,12 +133,11 @@ public void testBasicSurefireReportIfShowSuccessIsFalse() throws Exception { | |
|
||
public void testBasicSurefireReportIfLinkXrefIsFalse() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "basic-surefire-report-linkxref-false/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
boolean linkXRef = (Boolean) getVariableValueFromObject(mojo, "linkXRef"); | ||
assertFalse(linkXRef); | ||
mojo.execute(); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/basic-surefire-report-linkxref-false/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-linkxref-false/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -149,10 +147,9 @@ public void testBasicSurefireReportIfLinkXrefIsFalse() throws Exception { | |
|
||
public void testBasicSurefireReportIfReportingIsNull() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "basic-surefire-report-reporting-null/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/basic-surefire-report-reporting-null/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-reporting-null/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -163,10 +160,9 @@ public void testBasicSurefireReportIfReportingIsNull() throws Exception { | |
@SuppressWarnings("checkstyle:methodname") | ||
public void testBasicSurefireReport_AnchorTestCases() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "basic-surefire-report-anchor-test-cases/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -180,9 +176,9 @@ public void testBasicSurefireReport_AnchorTestCases() throws Exception { | |
|
||
public void testSurefireReportSingleError() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-report-single-error/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-single-error/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-single-error/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -267,10 +263,10 @@ public void testSurefireReportSingleError() throws Exception { | |
|
||
public void testSurefireReportNestedClassTrimStackTrace() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-report-nestedClass-trimStackTrace/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = new File( | ||
getBasedir(), "target/site/unit/surefire-report-nestedClass-trimStackTrace/surefire-report.html"); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/surefire-report-nestedClass-trimStackTrace/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -331,9 +327,9 @@ public void testSurefireReportNestedClassTrimStackTrace() throws Exception { | |
|
||
public void testSurefireReportNestedClass() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-report-nestedClass/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-nestedClass/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-nestedClass/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -418,10 +414,9 @@ public void testSurefireReportNestedClass() throws Exception { | |
|
||
public void testSurefireReportEnclosedTrimStackTrace() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-report-enclosed-trimStackTrace/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = | ||
new File(getBasedir(), "target/site/unit/surefire-report-enclosed-trimStackTrace/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-enclosed-trimStackTrace/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -482,9 +477,9 @@ public void testSurefireReportEnclosedTrimStackTrace() throws Exception { | |
|
||
public void testSurefireReportEnclosed() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-report-enclosed/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
mojo.execute(); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-enclosed/surefire-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-report-enclosed/surefire.html"); | ||
assertTrue(report.exists()); | ||
String htmlContent = FileUtils.fileRead(report); | ||
|
||
|
@@ -579,7 +574,7 @@ public void testSurefireReportEnclosed() throws Exception { | |
|
||
public void testCustomTitleAndDescriptionReport() throws Exception { | ||
File testPom = new File(getUnitBaseDir(), "surefire-1183/plugin-config.xml"); | ||
SurefireReportMojo mojo = createReportMojo(testPom); | ||
SurefireReport mojo = createReportMojo(testPom); | ||
|
||
File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory"); | ||
String outputName = (String) getVariableValueFromObject(mojo, "outputName"); | ||
|
@@ -590,11 +585,11 @@ public void testCustomTitleAndDescriptionReport() throws Exception { | |
new File(getBasedir() + "/src/test/resources/unit/surefire-1183/acceptancetest-reports") | ||
.getAbsolutePath(), | ||
reportsDir.getAbsolutePath()); | ||
assertEquals("acceptance-test-report", outputName); | ||
assertEquals("acceptance-test", outputName); | ||
|
||
mojo.execute(); | ||
|
||
File report = new File(getBasedir(), "target/site/unit/surefire-1183/acceptance-test-report.html"); | ||
File report = new File(getBasedir(), "target/site/unit/surefire-1183/acceptance-test.html"); | ||
|
||
assertTrue(report.exists()); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Allan Ramirez</a> | ||
*/ | ||
public class SurefireRepMavenProjectStub extends MavenProjectStub { | ||
public class SurefireReportMavenProjectStub extends MavenProjectStub { | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Allan Ramirez</a> | ||
*/ | ||
public class SurefireRepMavenProjectStub2 extends MavenProjectStub { | ||
public class SurefireReportMavenProjectStub2 extends MavenProjectStub { | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
|
Oops, something went wrong.