public abstract class AbstractMavenIntegrationTestCase
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
protected static String |
ALL_MAVEN_VERSIONS |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMavenIntegrationTestCase(String versionRangeStr) |
protected |
AbstractMavenIntegrationTestCase(String versionRangeStr,
String matchPattern) |
Modifier and Type | Method and Description |
---|---|
static void |
assertCanonicalFileEquals(File expected,
File actual) |
static void |
assertCanonicalFileEquals(String message,
File expected,
File actual) |
static void |
assertCanonicalFileEquals(String expected,
String actual) |
static void |
assertCanonicalFileEquals(String message,
String expected,
String actual) |
protected void |
failingMavenVersions(String versionRange)
Inverts the execution of a test case for cases where we discovered a bug in the test case, have corrected the
test case and shipped versions of Maven with a bug because of the faulty test case.
|
protected ArtifactVersion |
getMavenVersion()
Gets the Maven version used to run this test.
|
protected boolean |
isSkipped()
Can be called by version specific setUp calls
|
protected boolean |
matchesVersionRange(String versionRangeStr)
This allows fine-grained control over execution of individual test methods
by allowing tests to adjust to the current Maven version, or else simply avoid
executing altogether if the wrong version is present.
|
protected Verifier |
newVerifier(String basedir) |
protected Verifier |
newVerifier(String basedir,
boolean debug) |
protected Verifier |
newVerifier(String basedir,
String settings) |
protected Verifier |
newVerifier(String basedir,
String settings,
boolean debug) |
protected void |
requiresJavaVersion(String versionRange)
Guards the execution of a test case by checking that the current Java version matches the specified version
range.
|
protected void |
requiresMavenVersion(String versionRange)
Guards the execution of a test case by checking that the current Maven version matches the specified version
range.
|
protected void |
runTest() |
protected File |
setupLocalRepo() |
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString
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, fail, fail, failNotEquals, failNotSame, failSame
protected static final String ALL_MAVEN_VERSIONS
protected AbstractMavenIntegrationTestCase(String versionRangeStr)
protected final ArtifactVersion getMavenVersion()
null
if unknown.protected boolean matchesVersionRange(String versionRangeStr)
protected final boolean isSkipped()
protected void runTest() throws Throwable
runTest
in class junit.framework.TestCase
Throwable
protected void requiresJavaVersion(String versionRange)
versionRange
- The version range that specifies the acceptable Java versions for the test, must not be
null
.protected void requiresMavenVersion(String versionRange)
versionRange
- The version range that specifies the acceptable Maven versions for the test, must not be
null
.protected void failingMavenVersions(String versionRange)
versionRange
- protected File setupLocalRepo() throws IOException
IOException
protected Verifier newVerifier(String basedir) throws VerificationException
VerificationException
protected Verifier newVerifier(String basedir, String settings) throws VerificationException
VerificationException
protected Verifier newVerifier(String basedir, boolean debug) throws VerificationException
VerificationException
protected Verifier newVerifier(String basedir, String settings, boolean debug) throws VerificationException
VerificationException
public static void assertCanonicalFileEquals(String message, File expected, File actual) throws IOException
IOException
public static void assertCanonicalFileEquals(File expected, File actual) throws IOException
IOException
public static void assertCanonicalFileEquals(String message, String expected, String actual) throws IOException
IOException
public static void assertCanonicalFileEquals(String expected, String actual) throws IOException
IOException
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.