This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FIXED JENKINS-12853] Always use findbugsXml.xml when
findbugs-maven-plugin version >= 2.4.0 is used.
- Loading branch information
Showing
3 changed files
with
66 additions
and
4 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
34 changes: 34 additions & 0 deletions
34
plugin/src/test/java/hudson/plugins/findbugs/FindBugsPluginTest.java
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package hudson.plugins.findbugs; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
/** | ||
* Tests the class {@link FindBugsPlugin}. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
public class FindBugsPluginTest { | ||
private static final String WRONG_MAVEN_DETECTION = "Wrong maven detection"; | ||
|
||
/** | ||
* Verifies mapping of maven versions to FindBugs versions. | ||
*/ | ||
@Test | ||
public void testFindBugsVersion() { | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2.4.0-SNAPSHOT")); | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2.4.0")); | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2.4.1")); | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2.5")); | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("3.0.1")); | ||
assertTrue(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("3.0")); | ||
|
||
assertFalse(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2.3.4")); | ||
assertFalse(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("1.3.4")); | ||
|
||
assertFalse(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("2")); | ||
assertFalse(WRONG_MAVEN_DETECTION, FindBugsPlugin.isFindBugs2x("Nothing")); | ||
} | ||
} | ||
|