mirror of https://github.com/apache/maven.git
[MNG-7451] - Remove public modifier from test methods / test classes
This commit is contained in:
parent
d7d8544669
commit
c49c4e0b18
|
@ -34,10 +34,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class GlobalSettingsTest {
|
||||
class GlobalSettingsTest {
|
||||
|
||||
@Test
|
||||
public void testValidGlobalSettings() throws Exception {
|
||||
void testValidGlobalSettings() throws Exception {
|
||||
String basedir = System.getProperty("basedir", System.getProperty("user.dir"));
|
||||
|
||||
File globalSettingsFile = new File(basedir, "src/assembly/maven/conf/settings.xml");
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class SettingsTest {
|
||||
class SettingsTest {
|
||||
|
||||
@Test
|
||||
void testSetLocalRepository() {
|
||||
|
|
|
@ -35,14 +35,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class ArtifactUtilsTest {
|
||||
class ArtifactUtilsTest {
|
||||
|
||||
private Artifact newArtifact(String aid) {
|
||||
return new DefaultArtifact("group", aid, VersionRange.createFromVersion("1.0"), "test", "jar", "tests", null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsSnapshot() {
|
||||
void testIsSnapshot() {
|
||||
assertFalse(ArtifactUtils.isSnapshot(null));
|
||||
assertFalse(ArtifactUtils.isSnapshot(""));
|
||||
assertFalse(ArtifactUtils.isSnapshot("1.2.3"));
|
||||
|
@ -53,7 +53,7 @@ public class ArtifactUtilsTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testToSnapshotVersion() {
|
||||
void testToSnapshotVersion() {
|
||||
assertEquals("1.2.3", ArtifactUtils.toSnapshotVersion("1.2.3"));
|
||||
assertEquals("1.2.3-SNAPSHOT", ArtifactUtils.toSnapshotVersion("1.2.3-SNAPSHOT"));
|
||||
assertEquals("1.2.3-SNAPSHOT", ArtifactUtils.toSnapshotVersion("1.2.3-20090413.094722-2"));
|
||||
|
@ -64,7 +64,7 @@ public class ArtifactUtilsTest {
|
|||
* Tests that the ordering of the map resembles the ordering of the input collection of artifacts.
|
||||
*/
|
||||
@Test
|
||||
public void testArtifactMapByVersionlessIdOrdering() throws Exception {
|
||||
void testArtifactMapByVersionlessIdOrdering() throws Exception {
|
||||
List<Artifact> list = new ArrayList<>();
|
||||
list.add(newArtifact("b"));
|
||||
list.add(newArtifact("a"));
|
||||
|
|
|
@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class DefaultArtifactTest {
|
||||
class DefaultArtifactTest {
|
||||
|
||||
private DefaultArtifact artifact;
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class DefaultArtifactTest {
|
|||
private ArtifactHandlerMock artifactHandler;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
artifactHandler = new ArtifactHandlerMock();
|
||||
versionRange = VersionRange.createFromVersion(version);
|
||||
artifact = new DefaultArtifact(groupId, artifactId, versionRange, scope, type, classifier, artifactHandler);
|
||||
|
@ -60,7 +60,7 @@ public class DefaultArtifactTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetVersionReturnsResolvedVersionOnSnapshot() {
|
||||
void testGetVersionReturnsResolvedVersionOnSnapshot() {
|
||||
assertEquals(snapshotResolvedVersion, snapshotArtifact.getVersion());
|
||||
|
||||
// this is FOUL!
|
||||
|
@ -70,55 +70,55 @@ public class DefaultArtifactTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetDependencyConflictId() {
|
||||
void testGetDependencyConflictId() {
|
||||
assertEquals(groupId + ":" + artifactId + ":" + type + ":" + classifier, artifact.getDependencyConflictId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDependencyConflictIdNullGroupId() {
|
||||
void testGetDependencyConflictIdNullGroupId() {
|
||||
artifact.setGroupId(null);
|
||||
assertEquals(null + ":" + artifactId + ":" + type + ":" + classifier, artifact.getDependencyConflictId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDependencyConflictIdNullClassifier() {
|
||||
void testGetDependencyConflictIdNullClassifier() {
|
||||
artifact = new DefaultArtifact(groupId, artifactId, versionRange, scope, type, null, artifactHandler);
|
||||
assertEquals(groupId + ":" + artifactId + ":" + type, artifact.getDependencyConflictId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDependencyConflictIdNullScope() {
|
||||
void testGetDependencyConflictIdNullScope() {
|
||||
artifact.setScope(null);
|
||||
assertEquals(groupId + ":" + artifactId + ":" + type + ":" + classifier, artifact.getDependencyConflictId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToString() {
|
||||
void testToString() {
|
||||
assertEquals(
|
||||
groupId + ":" + artifactId + ":" + type + ":" + classifier + ":" + version + ":" + scope,
|
||||
artifact.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToStringNullGroupId() {
|
||||
void testToStringNullGroupId() {
|
||||
artifact.setGroupId(null);
|
||||
assertEquals(artifactId + ":" + type + ":" + classifier + ":" + version + ":" + scope, artifact.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToStringNullClassifier() {
|
||||
void testToStringNullClassifier() {
|
||||
artifact = new DefaultArtifact(groupId, artifactId, versionRange, scope, type, null, artifactHandler);
|
||||
assertEquals(groupId + ":" + artifactId + ":" + type + ":" + version + ":" + scope, artifact.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToStringNullScope() {
|
||||
void testToStringNullScope() {
|
||||
artifact.setScope(null);
|
||||
assertEquals(groupId + ":" + artifactId + ":" + type + ":" + classifier + ":" + version, artifact.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComparisonByVersion() {
|
||||
void testComparisonByVersion() {
|
||||
Artifact artifact1 = new DefaultArtifact(
|
||||
groupId, artifactId, VersionRange.createFromVersion("5.0"), scope, type, classifier, artifactHandler);
|
||||
Artifact artifact2 = new DefaultArtifact(
|
||||
|
@ -134,7 +134,7 @@ public class DefaultArtifactTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNonResolvedVersionRangeConsistentlyYieldsNullVersions() throws Exception {
|
||||
void testNonResolvedVersionRangeConsistentlyYieldsNullVersions() throws Exception {
|
||||
VersionRange vr = VersionRange.createFromVersionSpec("[1.0,2.0)");
|
||||
artifact = new DefaultArtifact(groupId, artifactId, vr, scope, type, null, artifactHandler);
|
||||
assertNull(artifact.getVersion());
|
||||
|
|
|
@ -32,10 +32,10 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class ComparableVersionIT {
|
||||
class ComparableVersionIT {
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
void test() throws Exception {
|
||||
Files.walkFileTree(Paths.get("target"), new SimpleFileVisitor<Path>() {
|
||||
Pattern mavenArtifactJar = Pattern.compile("maven-artifact-[\\d.]+(-SNAPSHOT)?\\.jar");
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
* @author <a href="mailto:hboutemy@apache.org">Hervé Boutemy</a>
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class ComparableVersionTest {
|
||||
class ComparableVersionTest {
|
||||
private ComparableVersion newComparable(String version) {
|
||||
ComparableVersion ret = new ComparableVersion(version);
|
||||
String canonical = ret.getCanonical();
|
||||
|
@ -115,17 +115,17 @@ public class ComparableVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVersionsQualifier() {
|
||||
void testVersionsQualifier() {
|
||||
checkVersionsOrder(VERSIONS_QUALIFIER);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVersionsNumber() {
|
||||
void testVersionsNumber() {
|
||||
checkVersionsOrder(VERSIONS_NUMBER);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVersionsEqual() {
|
||||
void testVersionsEqual() {
|
||||
newComparable("1.0-alpha");
|
||||
checkVersionsEqual("1", "1");
|
||||
checkVersionsEqual("1", "1.0");
|
||||
|
@ -178,7 +178,7 @@ public class ComparableVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVersionComparing() {
|
||||
void testVersionComparing() {
|
||||
checkVersionsOrder("1", "2");
|
||||
checkVersionsOrder("1.5", "2");
|
||||
checkVersionsOrder("1", "2.5");
|
||||
|
@ -209,13 +209,13 @@ public class ComparableVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLeadingZeroes() {
|
||||
void testLeadingZeroes() {
|
||||
checkVersionsOrder("0.7", "2");
|
||||
checkVersionsOrder("0.2", "1.0.7");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetCanonical() {
|
||||
void testGetCanonical() {
|
||||
// MNG-7700
|
||||
newComparable("0.x");
|
||||
newComparable("0-x");
|
||||
|
@ -236,7 +236,7 @@ public class ComparableVersionTest {
|
|||
* <a href="https://netbeans.org/bugzilla/show_bug.cgi?id=226100">226100</a>
|
||||
*/
|
||||
@Test
|
||||
public void testMng5568() {
|
||||
void testMng5568() {
|
||||
String a = "6.1.0";
|
||||
String b = "6.1.0rc3";
|
||||
String c = "6.1H.5-beta"; // this is the unusual version string, with 'H' in the middle
|
||||
|
@ -250,7 +250,7 @@ public class ComparableVersionTest {
|
|||
* Test <a href="https://jira.apache.org/jira/browse/MNG-6572">MNG-6572</a> optimization.
|
||||
*/
|
||||
@Test
|
||||
public void testMng6572() {
|
||||
void testMng6572() {
|
||||
String a = "20190126.230843"; // resembles a SNAPSHOT
|
||||
String b = "1234567890.12345"; // 10 digit number
|
||||
String c = "123456789012345.1H.5-beta"; // 15 digit number
|
||||
|
@ -269,7 +269,7 @@ public class ComparableVersionTest {
|
|||
* (related to MNG-6572 optimization)
|
||||
*/
|
||||
@Test
|
||||
public void testVersionEqualWithLeadingZeroes() {
|
||||
void testVersionEqualWithLeadingZeroes() {
|
||||
// versions with string lengths from 1 to 19
|
||||
String[] arr = new String[] {
|
||||
"0000000000000000001",
|
||||
|
@ -301,7 +301,7 @@ public class ComparableVersionTest {
|
|||
* (related to MNG-6572 optimization)
|
||||
*/
|
||||
@Test
|
||||
public void testVersionZeroEqualWithLeadingZeroes() {
|
||||
void testVersionZeroEqualWithLeadingZeroes() {
|
||||
// versions with string lengths from 1 to 19
|
||||
String[] arr = new String[] {
|
||||
"0000000000000000000",
|
||||
|
@ -333,7 +333,7 @@ public class ComparableVersionTest {
|
|||
* for qualifiers that start with "-0.", which was showing A == C and B == C but A < B.
|
||||
*/
|
||||
@Test
|
||||
public void testMng6964() {
|
||||
void testMng6964() {
|
||||
String a = "1-0.alpha";
|
||||
String b = "1-0.beta";
|
||||
String c = "1";
|
||||
|
@ -344,7 +344,7 @@ public class ComparableVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLocaleIndependent() {
|
||||
void testLocaleIndependent() {
|
||||
Locale orig = Locale.getDefault();
|
||||
Locale[] locales = {Locale.ENGLISH, new Locale("tr"), Locale.getDefault()};
|
||||
try {
|
||||
|
@ -358,7 +358,7 @@ public class ComparableVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReuse() {
|
||||
void testReuse() {
|
||||
ComparableVersion c1 = new ComparableVersion("1");
|
||||
c1.parseVersion("2");
|
||||
|
||||
|
@ -373,7 +373,7 @@ public class ComparableVersionTest {
|
|||
* 1.0.0.X1 < 1.0.0-X2 for any string X
|
||||
*/
|
||||
@Test
|
||||
public void testMng7644() {
|
||||
void testMng7644() {
|
||||
for (String x : new String[] {"abc", "alpha", "a", "beta", "b", "def", "milestone", "m", "RC"}) {
|
||||
// 1.0.0.X1 < 1.0.0-X2 for any string x
|
||||
checkVersionsOrder("1.0.0." + x + "1", "1.0.0-" + x + "2");
|
||||
|
|
|
@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
*/
|
||||
public class DefaultArtifactVersionTest {
|
||||
class DefaultArtifactVersionTest {
|
||||
private ArtifactVersion newArtifactVersion(String version) {
|
||||
return new DefaultArtifactVersion(version);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class DefaultArtifactVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVersionParsing() {
|
||||
void testVersionParsing() {
|
||||
checkVersionParsing("1", 1, 0, 0, 0, null);
|
||||
checkVersionParsing("1.2", 1, 2, 0, 0, null);
|
||||
checkVersionParsing("1.2.3", 1, 2, 3, 0, null);
|
||||
|
@ -86,7 +86,7 @@ public class DefaultArtifactVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVersionComparing() {
|
||||
void testVersionComparing() {
|
||||
assertVersionEqual("1", "1");
|
||||
assertVersionOlder("1", "2");
|
||||
assertVersionOlder("1.5", "2");
|
||||
|
@ -133,7 +133,7 @@ public class DefaultArtifactVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVersionSnapshotComparing() {
|
||||
void testVersionSnapshotComparing() {
|
||||
assertVersionEqual("1-SNAPSHOT", "1-SNAPSHOT");
|
||||
assertVersionOlder("1-SNAPSHOT", "2-SNAPSHOT");
|
||||
assertVersionOlder("1.5-SNAPSHOT", "2-SNAPSHOT");
|
||||
|
@ -167,14 +167,14 @@ public class DefaultArtifactVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSnapshotVsReleases() {
|
||||
void testSnapshotVsReleases() {
|
||||
assertVersionOlder("1.0-RC1", "1.0-SNAPSHOT");
|
||||
assertVersionOlder("1.0-rc1", "1.0-SNAPSHOT");
|
||||
assertVersionOlder("1.0-rc-1", "1.0-SNAPSHOT");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHashCode() {
|
||||
void testHashCode() {
|
||||
ArtifactVersion v1 = newArtifactVersion("1");
|
||||
ArtifactVersion v2 = newArtifactVersion("1.0");
|
||||
assertTrue(v1.equals(v2));
|
||||
|
@ -182,12 +182,12 @@ public class DefaultArtifactVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEqualsNullSafe() {
|
||||
void testEqualsNullSafe() {
|
||||
assertFalse(newArtifactVersion("1").equals(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEqualsTypeSafe() {
|
||||
void testEqualsTypeSafe() {
|
||||
assertFalse(newArtifactVersion("1").equals("non-an-artifact-version-instance"));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
*/
|
||||
public class VersionRangeTest {
|
||||
class VersionRangeTest {
|
||||
private static final String CHECK_NUM_RESTRICTIONS = "check number of restrictions";
|
||||
|
||||
private static final String CHECK_UPPER_BOUND = "check upper bound";
|
||||
|
@ -53,7 +53,7 @@ public class VersionRangeTest {
|
|||
private static final String CHECK_SELECTED_VERSION = "check selected version";
|
||||
|
||||
@Test
|
||||
public void testRange() throws InvalidVersionSpecificationException, OverConstrainedVersionException {
|
||||
void testRange() throws InvalidVersionSpecificationException, OverConstrainedVersionException {
|
||||
Artifact artifact = null;
|
||||
|
||||
VersionRange range = VersionRange.createFromVersionSpec("(,1.0]");
|
||||
|
@ -157,14 +157,14 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSameUpperAndLowerBoundRoundtrip() throws InvalidVersionSpecificationException {
|
||||
void testSameUpperAndLowerBoundRoundtrip() throws InvalidVersionSpecificationException {
|
||||
VersionRange range = VersionRange.createFromVersionSpec("[1.0]");
|
||||
VersionRange range2 = VersionRange.createFromVersionSpec(range.toString());
|
||||
assertEquals(range, range2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidRanges() {
|
||||
void testInvalidRanges() {
|
||||
checkInvalidRange("(1.0)");
|
||||
checkInvalidRange("[1.0)");
|
||||
checkInvalidRange("(1.0]");
|
||||
|
@ -182,7 +182,7 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testIntersections() throws InvalidVersionSpecificationException {
|
||||
void testIntersections() throws InvalidVersionSpecificationException {
|
||||
VersionRange range1 = VersionRange.createFromVersionSpec("1.0");
|
||||
VersionRange range2 = VersionRange.createFromVersionSpec("1.1");
|
||||
VersionRange mergedRange = range1.restrict(range2);
|
||||
|
@ -664,7 +664,7 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReleaseRangeBoundsContainsSnapshots() throws InvalidVersionSpecificationException {
|
||||
void testReleaseRangeBoundsContainsSnapshots() throws InvalidVersionSpecificationException {
|
||||
VersionRange range = VersionRange.createFromVersionSpec("[1.0,1.2]");
|
||||
|
||||
assertTrue(range.containsVersion(new DefaultArtifactVersion("1.1-SNAPSHOT")));
|
||||
|
@ -673,7 +673,7 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSnapshotRangeBoundsCanContainSnapshots() throws InvalidVersionSpecificationException {
|
||||
void testSnapshotRangeBoundsCanContainSnapshots() throws InvalidVersionSpecificationException {
|
||||
VersionRange range = VersionRange.createFromVersionSpec("[1.0,1.2-SNAPSHOT]");
|
||||
|
||||
assertTrue(range.containsVersion(new DefaultArtifactVersion("1.1-SNAPSHOT")));
|
||||
|
@ -686,7 +686,7 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSnapshotSoftVersionCanContainSnapshot() throws InvalidVersionSpecificationException {
|
||||
void testSnapshotSoftVersionCanContainSnapshot() throws InvalidVersionSpecificationException {
|
||||
VersionRange range = VersionRange.createFromVersionSpec("1.0-SNAPSHOT");
|
||||
|
||||
assertTrue(range.containsVersion(new DefaultArtifactVersion("1.0-SNAPSHOT")));
|
||||
|
@ -700,7 +700,7 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testContains() throws InvalidVersionSpecificationException {
|
||||
void testContains() throws InvalidVersionSpecificationException {
|
||||
ArtifactVersion actualVersion = new DefaultArtifactVersion("2.0.5");
|
||||
assertTrue(enforceVersion("2.0.5", actualVersion));
|
||||
assertTrue(enforceVersion("2.0.4", actualVersion));
|
||||
|
@ -723,13 +723,13 @@ public class VersionRangeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOrder0() {
|
||||
void testOrder0() {
|
||||
// assertTrue( new DefaultArtifactVersion( "1.0-alpha10" ).compareTo( new DefaultArtifactVersion( "1.0-alpha1" )
|
||||
// ) > 0 );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCache() throws InvalidVersionSpecificationException {
|
||||
void testCache() throws InvalidVersionSpecificationException {
|
||||
VersionRange range = VersionRange.createFromVersionSpec("[1.0,1.2]");
|
||||
assertSame(range, VersionRange.createFromVersionSpec("[1.0,1.2]")); // same instance from spec cache
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class DefaultProblemCollectorTest {
|
||||
class DefaultProblemCollectorTest {
|
||||
|
||||
@Test
|
||||
public void testGetProblems() {
|
||||
void testGetProblems() {
|
||||
DefaultProblemCollector collector = new DefaultProblemCollector(null);
|
||||
assertNotNull(collector.getProblems());
|
||||
assertEquals(0, collector.getProblems().size());
|
||||
|
@ -56,7 +56,7 @@ public class DefaultProblemCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetSource() {
|
||||
void testSetSource() {
|
||||
DefaultProblemCollector collector = new DefaultProblemCollector(null);
|
||||
|
||||
collector.add(null, "PROBLEM1", -1, -1, null);
|
||||
|
|
|
@ -25,10 +25,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
public class DefaultProblemTest {
|
||||
class DefaultProblemTest {
|
||||
|
||||
@Test
|
||||
public void testGetSeverity() {
|
||||
void testGetSeverity() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertEquals(Severity.ERROR, problem.getSeverity());
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLineNumber() {
|
||||
void testGetLineNumber() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertEquals(-1, problem.getLineNumber());
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetColumnNumber() {
|
||||
void testGetColumnNumber() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertEquals(-1, problem.getColumnNumber());
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetException() {
|
||||
void testGetException() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertNull(problem.getException());
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetSource() {
|
||||
void testGetSource() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertEquals("", problem.getSource());
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLocation() {
|
||||
void testGetLocation() {
|
||||
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
|
||||
assertEquals("", problem.getLocation());
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class DefaultProblemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetMessage() {
|
||||
void testGetMessage() {
|
||||
DefaultProblem problem = new DefaultProblem("MESSAGE", null, null, -1, -1, null);
|
||||
assertEquals("MESSAGE", problem.getMessage());
|
||||
|
||||
|
|
|
@ -27,17 +27,17 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class FileSourceTest {
|
||||
class FileSourceTest {
|
||||
|
||||
@Test
|
||||
public void testFileSource() {
|
||||
void testFileSource() {
|
||||
NullPointerException e = assertThrows(
|
||||
NullPointerException.class, () -> new FileSource(null), "Should fail, since you must specify a file");
|
||||
assertEquals("file cannot be null", e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetInputStream() throws Exception {
|
||||
void testGetInputStream() throws Exception {
|
||||
File txtFile = new File("target/test-classes/source.txt");
|
||||
FileSource source = new FileSource(txtFile);
|
||||
|
||||
|
@ -49,14 +49,14 @@ public class FileSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLocation() {
|
||||
void testGetLocation() {
|
||||
File txtFile = new File("target/test-classes/source.txt");
|
||||
FileSource source = new FileSource(txtFile);
|
||||
assertEquals(txtFile.getAbsolutePath(), source.getLocation());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetFile() {
|
||||
void testGetFile() {
|
||||
File txtFile = new File("target/test-classes/source.txt");
|
||||
FileSource source = new FileSource(txtFile);
|
||||
assertEquals(txtFile.getAbsoluteFile(), source.getFile());
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
|
||||
public class ProblemCollectorFactoryTest {
|
||||
class ProblemCollectorFactoryTest {
|
||||
|
||||
@Test
|
||||
public void testNewInstance() {
|
||||
void testNewInstance() {
|
||||
ProblemCollector collector1 = ProblemCollectorFactory.newInstance(null);
|
||||
|
||||
Problem problem = new DefaultProblem("MESSAGE1", null, null, -1, -1, null);
|
||||
|
|
|
@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class StringSourceTest {
|
||||
class StringSourceTest {
|
||||
@Test
|
||||
public void testGetInputStream() throws Exception {
|
||||
void testGetInputStream() throws Exception {
|
||||
StringSource source = new StringSource("Hello World!");
|
||||
|
||||
try (InputStream is = source.getInputStream();
|
||||
|
@ -37,7 +37,7 @@ public class StringSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLocation() {
|
||||
void testGetLocation() {
|
||||
StringSource source = new StringSource("Hello World!");
|
||||
assertEquals("(memory)", source.getLocation());
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class StringSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetContent() {
|
||||
void testGetContent() {
|
||||
StringSource source = new StringSource(null);
|
||||
assertEquals("", source.getContent());
|
||||
|
||||
|
|
|
@ -28,17 +28,17 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class UrlSourceTest {
|
||||
class UrlSourceTest {
|
||||
|
||||
@Test
|
||||
public void testUrlSource() {
|
||||
void testUrlSource() {
|
||||
NullPointerException e = assertThrows(
|
||||
NullPointerException.class, () -> new UrlSource(null), "Should fail, since you must specify a url");
|
||||
assertEquals("url cannot be null", e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetInputStream() throws Exception {
|
||||
void testGetInputStream() throws Exception {
|
||||
URL txtFile = new File("target/test-classes/source.txt").toURI().toURL();
|
||||
UrlSource source = new UrlSource(txtFile);
|
||||
try (InputStream is = source.getInputStream();
|
||||
|
@ -48,7 +48,7 @@ public class UrlSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLocation() throws Exception {
|
||||
void testGetLocation() throws Exception {
|
||||
URL txtFile = new File("target/test-classes/source.txt").toURI().toURL();
|
||||
UrlSource source = new UrlSource(txtFile);
|
||||
assertEquals(txtFile.toExternalForm(), source.getLocation());
|
||||
|
|
|
@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock;
|
|||
/**
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
*/
|
||||
public class ArtifactDeployerTest extends AbstractArtifactComponentTestCase {
|
||||
class ArtifactDeployerTest extends AbstractArtifactComponentTestCase {
|
||||
@Inject
|
||||
private ArtifactDeployer artifactDeployer;
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class ArtifactDeployerTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testArtifactInstallation() throws Exception {
|
||||
void testArtifactInstallation() throws Exception {
|
||||
sessionScope.enter();
|
||||
try {
|
||||
sessionScope.seed(MavenSession.class, mock(MavenSession.class));
|
||||
|
|
|
@ -28,13 +28,13 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@PlexusTest
|
||||
public class DefaultArtifactFactoryTest {
|
||||
class DefaultArtifactFactoryTest {
|
||||
|
||||
@Inject
|
||||
ArtifactFactory factory;
|
||||
|
||||
@Test
|
||||
public void testPropagationOfSystemScopeRegardlessOfInheritedScope() {
|
||||
void testPropagationOfSystemScopeRegardlessOfInheritedScope() {
|
||||
Artifact artifact = factory.createDependencyArtifact(
|
||||
"test-grp", "test-artifact", VersionRange.createFromVersion("1.0"), "type", null, "system", "provided");
|
||||
Artifact artifact2 = factory.createDependencyArtifact(
|
||||
|
|
|
@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock;
|
|||
/**
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
*/
|
||||
public class ArtifactInstallerTest extends AbstractArtifactComponentTestCase {
|
||||
class ArtifactInstallerTest extends AbstractArtifactComponentTestCase {
|
||||
@Inject
|
||||
private ArtifactInstaller artifactInstaller;
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class ArtifactInstallerTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testArtifactInstallation() throws Exception {
|
||||
void testArtifactInstallation() throws Exception {
|
||||
sessionScope.enter();
|
||||
try {
|
||||
sessionScope.seed(MavenSession.class, mock(MavenSession.class));
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class MavenArtifactRepositoryTest {
|
||||
class MavenArtifactRepositoryTest {
|
||||
private static class MavenArtifactRepositorySubclass extends MavenArtifactRepository {
|
||||
String id;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class MavenArtifactRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHashCodeEquals() {
|
||||
void testHashCodeEquals() {
|
||||
MavenArtifactRepositorySubclass r1 = new MavenArtifactRepositorySubclass("foo");
|
||||
MavenArtifactRepositorySubclass r2 = new MavenArtifactRepositorySubclass("foo");
|
||||
MavenArtifactRepositorySubclass r3 = new MavenArtifactRepositorySubclass("bar");
|
||||
|
|
|
@ -30,11 +30,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Mauro Talevi
|
||||
*/
|
||||
public class ArtifactResolutionExceptionTest {
|
||||
class ArtifactResolutionExceptionTest {
|
||||
private static final String LS = System.lineSeparator();
|
||||
|
||||
@Test
|
||||
public void testMissingArtifactMessageFormat() {
|
||||
void testMissingArtifactMessageFormat() {
|
||||
String message = "Missing artifact";
|
||||
String indentation = " ";
|
||||
String groupId = "aGroupId";
|
||||
|
|
|
@ -52,7 +52,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
||||
class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
||||
@Inject
|
||||
private ArtifactResolver artifactResolver;
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolutionOfASingleArtifactWhereTheArtifactIsPresentInTheLocalRepository() throws Exception {
|
||||
void testResolutionOfASingleArtifactWhereTheArtifactIsPresentInTheLocalRepository() throws Exception {
|
||||
Artifact a = createLocalArtifact("a", "1.0");
|
||||
|
||||
artifactResolver.resolve(a, remoteRepositories(), localRepository());
|
||||
|
@ -88,8 +88,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void
|
||||
testResolutionOfASingleArtifactWhereTheArtifactIsNotPresentLocallyAndMustBeRetrievedFromTheRemoteRepository()
|
||||
void testResolutionOfASingleArtifactWhereTheArtifactIsNotPresentLocallyAndMustBeRetrievedFromTheRemoteRepository()
|
||||
throws Exception {
|
||||
Artifact b = createRemoteArtifact("b", "1.0-SNAPSHOT");
|
||||
deleteLocalArtifact(b);
|
||||
|
@ -104,7 +103,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalRepository() throws Exception {
|
||||
void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalRepository() throws Exception {
|
||||
Artifact g = createLocalArtifact("g", "1.0");
|
||||
|
||||
Artifact h = createLocalArtifact("h", "1.0");
|
||||
|
@ -126,7 +125,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void
|
||||
void
|
||||
testTransitiveResolutionWhereAllArtifactsAreNotPresentInTheLocalRepositoryAndMustBeRetrievedFromTheRemoteRepository()
|
||||
throws Exception {
|
||||
Artifact i = createRemoteArtifact("i", "1.0-SNAPSHOT");
|
||||
|
@ -152,7 +151,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolutionFailureWhenArtifactNotPresentInRemoteRepository() throws Exception {
|
||||
void testResolutionFailureWhenArtifactNotPresentInRemoteRepository() throws Exception {
|
||||
Artifact k = createArtifact("k", "1.0");
|
||||
|
||||
assertThrows(
|
||||
|
@ -162,7 +161,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolutionOfAnArtifactWhereOneRemoteRepositoryIsBadButOneIsGood() throws Exception {
|
||||
void testResolutionOfAnArtifactWhereOneRemoteRepositoryIsBadButOneIsGood() throws Exception {
|
||||
Artifact l = createRemoteArtifact("l", "1.0-SNAPSHOT");
|
||||
deleteLocalArtifact(l);
|
||||
|
||||
|
@ -187,7 +186,7 @@ public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTransitiveResolutionOrder() throws Exception {
|
||||
void testTransitiveResolutionOrder() throws Exception {
|
||||
Artifact m = createLocalArtifact("m", "1.0");
|
||||
|
||||
Artifact n = createLocalArtifact("n", "1.0");
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class DefaultArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
||||
class DefaultArtifactResolverTest extends AbstractArtifactComponentTestCase {
|
||||
@Inject
|
||||
private ArtifactResolver artifactResolver;
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class DefaultArtifactResolverTest extends AbstractArtifactComponentTestCa
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMNG4738() throws Exception {
|
||||
void testMNG4738() throws Exception {
|
||||
Artifact g = createLocalArtifact("g", "1.0");
|
||||
createLocalArtifact("h", "1.0");
|
||||
artifactResolver.resolveTransitively(
|
||||
|
@ -88,7 +88,7 @@ public class DefaultArtifactResolverTest extends AbstractArtifactComponentTestCa
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLookup() throws Exception {
|
||||
void testLookup() throws Exception {
|
||||
ArtifactResolver resolver = getContainer().lookup(ArtifactResolver.class, "default");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,14 +31,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class AndArtifactFilterTest {
|
||||
class AndArtifactFilterTest {
|
||||
|
||||
private ArtifactFilter newSubFilter() {
|
||||
return artifact -> false;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
void testEquals() {
|
||||
AndArtifactFilter filter1 = new AndArtifactFilter();
|
||||
|
||||
AndArtifactFilter filter2 = new AndArtifactFilter(Arrays.asList(newSubFilter()));
|
||||
|
|
|
@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Igor Fedorenko
|
||||
*/
|
||||
public class FilterHashEqualsTest {
|
||||
class FilterHashEqualsTest {
|
||||
|
||||
@Test
|
||||
public void testIncludesExcludesArtifactFilter() {
|
||||
void testIncludesExcludesArtifactFilter() {
|
||||
List<String> patterns = Arrays.asList("c", "d", "e");
|
||||
|
||||
IncludesArtifactFilter f1 = new IncludesArtifactFilter(patterns);
|
||||
|
|
|
@ -31,14 +31,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class OrArtifactFilterTest {
|
||||
class OrArtifactFilterTest {
|
||||
|
||||
private ArtifactFilter newSubFilter() {
|
||||
return artifact -> false;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
void testEquals() {
|
||||
OrArtifactFilter filter1 = new OrArtifactFilter();
|
||||
|
||||
OrArtifactFilter filter2 = new OrArtifactFilter(Arrays.asList(newSubFilter()));
|
||||
|
|
|
@ -30,14 +30,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class ScopeArtifactFilterTest {
|
||||
class ScopeArtifactFilterTest {
|
||||
|
||||
private Artifact newArtifact(String scope) {
|
||||
return new DefaultArtifact("g", "a", "1.0", scope, "jar", "", null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInclude_Compile() {
|
||||
void testInclude_Compile() {
|
||||
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_COMPILE);
|
||||
|
||||
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));
|
||||
|
@ -48,7 +48,7 @@ public class ScopeArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInclude_CompilePlusRuntime() {
|
||||
void testInclude_CompilePlusRuntime() {
|
||||
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_COMPILE_PLUS_RUNTIME);
|
||||
|
||||
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));
|
||||
|
@ -59,7 +59,7 @@ public class ScopeArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInclude_Runtime() {
|
||||
void testInclude_Runtime() {
|
||||
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME);
|
||||
|
||||
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));
|
||||
|
@ -70,7 +70,7 @@ public class ScopeArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInclude_RuntimePlusSystem() {
|
||||
void testInclude_RuntimePlusSystem() {
|
||||
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME_PLUS_SYSTEM);
|
||||
|
||||
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));
|
||||
|
@ -81,7 +81,7 @@ public class ScopeArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInclude_Test() {
|
||||
void testInclude_Test() {
|
||||
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_TEST);
|
||||
|
||||
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));
|
||||
|
|
|
@ -35,12 +35,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
|
||||
/** @author Jason van Zyl */
|
||||
@PlexusTest
|
||||
public class TransformationManagerTest {
|
||||
class TransformationManagerTest {
|
||||
@Inject
|
||||
ArtifactTransformationManager tm;
|
||||
|
||||
@Test
|
||||
public void testTransformationManager() {
|
||||
void testTransformationManager() {
|
||||
List<ArtifactTransformation> tms = tm.getArtifactTransformations();
|
||||
|
||||
assertEquals(3, tms.size());
|
||||
|
|
|
@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
@PlexusTest
|
||||
public class DefaultProfileManagerTest {
|
||||
class DefaultProfileManagerTest {
|
||||
|
||||
@Inject
|
||||
PlexusContainer container;
|
||||
|
@ -47,7 +47,7 @@ public class DefaultProfileManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldActivateDefaultProfile() throws Exception {
|
||||
void testShouldActivateDefaultProfile() throws Exception {
|
||||
Profile notActivated = new Profile();
|
||||
notActivated.setId("notActivated");
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class DefaultProfileManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldNotActivateDefaultProfile() throws Exception {
|
||||
void testShouldNotActivateDefaultProfile() throws Exception {
|
||||
Profile syspropActivated = new Profile();
|
||||
syspropActivated.setId("syspropActivated");
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class DefaultProfileManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldNotActivateReversalOfPresentSystemProperty() throws Exception {
|
||||
void testShouldNotActivateReversalOfPresentSystemProperty() throws Exception {
|
||||
Profile syspropActivated = new Profile();
|
||||
syspropActivated.setId("syspropActivated");
|
||||
|
||||
|
@ -144,7 +144,7 @@ public class DefaultProfileManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldOverrideAndActivateInactiveProfile() throws Exception {
|
||||
void testShouldOverrideAndActivateInactiveProfile() throws Exception {
|
||||
Profile syspropActivated = new Profile();
|
||||
syspropActivated.setId("syspropActivated");
|
||||
|
||||
|
@ -173,7 +173,7 @@ public class DefaultProfileManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
|
||||
void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
|
||||
Profile syspropActivated = new Profile();
|
||||
syspropActivated.setId("syspropActivated");
|
||||
|
||||
|
@ -202,7 +202,7 @@ public class DefaultProfileManagerTest {
|
|||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testOsActivationProfile() throws Exception {
|
||||
void testOsActivationProfile() throws Exception {
|
||||
/*
|
||||
Profile osActivated = new Profile();
|
||||
osActivated.setId( "os-profile" );
|
||||
|
|
|
@ -32,7 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class ProjectClasspathTest extends AbstractMavenProjectTestCase {
|
||||
class ProjectClasspathTest extends AbstractMavenProjectTestCase {
|
||||
static final String dir = "projects/scope/";
|
||||
|
||||
@Override
|
||||
|
@ -51,7 +51,7 @@ public class ProjectClasspathTest extends AbstractMavenProjectTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testProjectClasspath() throws Exception {
|
||||
void testProjectClasspath() throws Exception {
|
||||
File f = getFileForClasspathResource(dir + "project-with-scoped-dependencies.xml");
|
||||
|
||||
MavenProject project = getProjectWithDependencies(f);
|
||||
|
|
|
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p4 inherits from p3
|
||||
|
@ -51,7 +51,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testProjectInheritance() throws Exception {
|
||||
void testProjectInheritance() throws Exception {
|
||||
MavenProject p4 = getProject(projectFile("p4"));
|
||||
|
||||
assertEquals("p4", p4.getName());
|
||||
|
|
|
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p4 inherits from p3
|
||||
|
@ -47,7 +47,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testProjectInheritance() throws Exception {
|
||||
void testProjectInheritance() throws Exception {
|
||||
// ----------------------------------------------------------------------
|
||||
// Check p0 value for org name
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
@ -45,7 +45,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p4 inherits from p3
|
||||
|
@ -61,7 +61,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testProjectInheritance() throws Exception {
|
||||
void testProjectInheritance() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
System.out.println("Local repository is at: " + localRepo.getAbsolutePath());
|
||||
|
|
|
@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -50,7 +50,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testProjectInheritance() throws Exception {
|
||||
void testProjectInheritance() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -54,7 +54,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagementOverridesTransitiveDependencyVersion() throws Exception {
|
||||
void testDependencyManagementOverridesTransitiveDependencyVersion() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
File pom0Basedir = pom0.getParentFile();
|
||||
|
|
|
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="rgoers@apache.org">Ralph Goers</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -48,7 +48,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagement() throws Exception {
|
||||
void testDependencyManagement() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="rgoers@apache.org">Ralph Goers</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -49,7 +49,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagement() throws Exception {
|
||||
void testDependencyManagement() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -49,7 +49,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagement() throws Exception {
|
||||
void testDependencyManagement() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="rgoers@apache.org">Ralph Goers</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -49,7 +49,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagement() throws Exception {
|
||||
void testDependencyManagement() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -61,7 +61,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
* a & b only.
|
||||
*/
|
||||
@Test
|
||||
public void testDependencyManagementExclusionsExcludeTransitively() throws Exception {
|
||||
void testDependencyManagementExclusionsExcludeTransitively() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
@ -96,7 +96,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives() throws Exception {
|
||||
void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
|
|
@ -42,7 +42,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -55,7 +55,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagementOverridesTransitiveDependencyVersion() throws Exception {
|
||||
void testDependencyManagementOverridesTransitiveDependencyVersion() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
|
|
@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
||||
* @see <a href="https://issues.apache.org/jira/browse/MNG-2919">MNG-2919</a>
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -46,7 +46,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testDependencyManagementDoesNotOverrideScopeOfCurrentArtifact() throws Exception {
|
||||
void testDependencyManagementDoesNotOverrideScopeOfCurrentArtifact() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
|
|
@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
* Verifies that plugin execution sections in the parent POM that have
|
||||
* inherit == false are not inherited to the child POM.
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -46,7 +46,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testFalsePluginExecutionInheritValue() throws Exception {
|
||||
void testFalsePluginExecutionInheritValue() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
|
|
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
*
|
||||
* @author jdcasey
|
||||
*/
|
||||
public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// p1 inherits from p0
|
||||
|
@ -44,7 +44,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testScmInfoCalculatedCorrectlyOnParentAndChildRead() throws Exception {
|
||||
void testScmInfoCalculatedCorrectlyOnParentAndChildRead() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom0 = new File(localRepo, "p0/pom.xml");
|
||||
|
@ -74,7 +74,7 @@ public class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testScmInfoCalculatedCorrectlyOnChildOnlyRead() throws Exception {
|
||||
void testScmInfoCalculatedCorrectlyOnChildOnlyRead() throws Exception {
|
||||
File localRepo = getLocalRepositoryPath();
|
||||
|
||||
File pom1 = new File(localRepo, "p0/modules/p1/pom.xml");
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DefaultPathTranslatorTest {
|
||||
class DefaultPathTranslatorTest {
|
||||
|
||||
@Test
|
||||
public void testAlignToBasedirWhereBasedirExpressionIsTheCompleteValue() {
|
||||
void testAlignToBasedirWhereBasedirExpressionIsTheCompleteValue() {
|
||||
File basedir = new File(System.getProperty("java.io.tmpdir"), "test").getAbsoluteFile();
|
||||
|
||||
String aligned = new DefaultPathTranslator().alignToBaseDirectory("${basedir}", basedir);
|
||||
|
@ -37,7 +37,7 @@ public class DefaultPathTranslatorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAlignToBasedirWhereBasedirExpressionIsTheValuePrefix() {
|
||||
void testAlignToBasedirWhereBasedirExpressionIsTheValuePrefix() {
|
||||
File basedir = new File(System.getProperty("java.io.tmpdir"), "test").getAbsoluteFile();
|
||||
|
||||
String aligned = new DefaultPathTranslator().alignToBaseDirectory("${basedir}/dir", basedir);
|
||||
|
@ -46,7 +46,7 @@ public class DefaultPathTranslatorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUnalignToBasedirWherePathEqualsBasedir() {
|
||||
void testUnalignToBasedirWherePathEqualsBasedir() {
|
||||
File basedir = new File(System.getProperty("java.io.tmpdir"), "test").getAbsoluteFile();
|
||||
|
||||
String unaligned = new DefaultPathTranslator().unalignFromBaseDirectory(basedir.getAbsolutePath(), basedir);
|
||||
|
|
|
@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
public class DefaultMirrorSelectorTest {
|
||||
class DefaultMirrorSelectorTest {
|
||||
@Test
|
||||
public void testMirrorWithMirrorOfPatternContainingANegationIsNotSelected() {
|
||||
void testMirrorWithMirrorOfPatternContainingANegationIsNotSelected() {
|
||||
ArtifactRepository repository = new DefaultArtifactRepository("snapshots.repo", "http://whatever", null);
|
||||
String pattern = "external:*, !snapshots.repo";
|
||||
assertFalse(DefaultMirrorSelector.matchPattern(repository, pattern));
|
||||
|
|
|
@ -55,7 +55,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
* @author Benjamin Bentmann
|
||||
*/
|
||||
@PlexusTest
|
||||
public class LegacyRepositorySystemTest {
|
||||
class LegacyRepositorySystemTest {
|
||||
@Inject
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class LegacyRepositorySystemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testThatASystemScopedDependencyIsNotResolvedFromRepositories() throws Exception {
|
||||
void testThatASystemScopedDependencyIsNotResolvedFromRepositories() throws Exception {
|
||||
//
|
||||
// We should get a whole slew of dependencies resolving this artifact transitively
|
||||
//
|
||||
|
@ -170,7 +170,7 @@ public class LegacyRepositorySystemTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLocalRepositoryBasedir() throws Exception {
|
||||
void testLocalRepositoryBasedir() throws Exception {
|
||||
File localRepoDir = new File("").getAbsoluteFile();
|
||||
|
||||
ArtifactRepository localRepo = repositorySystem.createLocalRepository(localRepoDir);
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertSame;
|
|||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@PlexusTest
|
||||
public class MirrorProcessorTest {
|
||||
class MirrorProcessorTest {
|
||||
@Inject
|
||||
private DefaultMirrorSelector mirrorSelector;
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class MirrorProcessorTest {
|
|||
private ArtifactRepositoryFactory repositorySystem;
|
||||
|
||||
@Test
|
||||
public void testExternalURL() {
|
||||
void testExternalURL() {
|
||||
assertTrue(DefaultMirrorSelector.isExternalRepo(getRepo("foo", "http://somehost")));
|
||||
assertTrue(DefaultMirrorSelector.isExternalRepo(getRepo("foo", "http://somehost:9090/somepath")));
|
||||
assertTrue(DefaultMirrorSelector.isExternalRepo(getRepo("foo", "ftp://somehost")));
|
||||
|
@ -66,7 +66,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMirrorLookup() {
|
||||
void testMirrorLookup() {
|
||||
Mirror mirrorA = newMirror("a", "a", "http://a");
|
||||
Mirror mirrorB = newMirror("b", "b", "http://b");
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMirrorWildcardLookup() {
|
||||
void testMirrorWildcardLookup() {
|
||||
Mirror mirrorA = newMirror("a", "a", "http://a");
|
||||
Mirror mirrorB = newMirror("b", "b", "http://b");
|
||||
Mirror mirrorC = newMirror("c", "*", "http://wildcard");
|
||||
|
@ -95,7 +95,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMirrorStopOnFirstMatch() {
|
||||
void testMirrorStopOnFirstMatch() {
|
||||
// exact matches win first
|
||||
Mirror mirrorA2 = newMirror("a2", "a,b", "http://a2");
|
||||
Mirror mirrorA = newMirror("a", "a", "http://a");
|
||||
|
@ -123,7 +123,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPatterns() {
|
||||
void testPatterns() {
|
||||
assertTrue(DefaultMirrorSelector.matchPattern(getRepo("a"), "*"));
|
||||
assertTrue(DefaultMirrorSelector.matchPattern(getRepo("a"), "*,"));
|
||||
assertTrue(DefaultMirrorSelector.matchPattern(getRepo("a"), ",*,"));
|
||||
|
@ -159,7 +159,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPatternsWithExternal() {
|
||||
void testPatternsWithExternal() {
|
||||
assertTrue(DefaultMirrorSelector.matchPattern(getRepo("a", "http://localhost"), "*"));
|
||||
assertFalse(DefaultMirrorSelector.matchPattern(getRepo("a", "http://localhost"), "external:*"));
|
||||
|
||||
|
@ -173,7 +173,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLayoutPattern() {
|
||||
void testLayoutPattern() {
|
||||
assertTrue(DefaultMirrorSelector.matchesLayout("default", null));
|
||||
assertTrue(DefaultMirrorSelector.matchesLayout("default", ""));
|
||||
assertTrue(DefaultMirrorSelector.matchesLayout("default", "*"));
|
||||
|
@ -192,7 +192,7 @@ public class MirrorProcessorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMirrorLayoutConsideredForMatching() {
|
||||
void testMirrorLayoutConsideredForMatching() {
|
||||
ArtifactRepository repo = getRepo("a");
|
||||
|
||||
Mirror mirrorA = newMirror("a", "a", null, "http://a");
|
||||
|
|
|
@ -39,7 +39,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTestCase {
|
||||
class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTestCase {
|
||||
|
||||
@Inject
|
||||
private ArtifactFactory artifactFactory;
|
||||
|
@ -60,7 +60,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testArtifact() throws Exception {
|
||||
void testArtifact() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -88,7 +88,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingArtifact() throws Exception {
|
||||
void testMissingArtifact() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -113,7 +113,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPom() throws Exception {
|
||||
void testPom() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -141,7 +141,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingPom() throws Exception {
|
||||
void testMissingPom() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -166,7 +166,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMetadata() throws Exception {
|
||||
void testMetadata() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -194,7 +194,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingMetadata() throws Exception {
|
||||
void testMissingMetadata() throws Exception {
|
||||
ArtifactRepository remoteRepository = remoteRepository();
|
||||
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
@ -220,7 +220,7 @@ public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testArtifactTouchFileName() throws Exception {
|
||||
void testArtifactTouchFileName() throws Exception {
|
||||
ArtifactRepository localRepository = localRepository();
|
||||
|
||||
Artifact a = artifactFactory.createArtifactWithClassifier("groupId", "a", "0.0.1-SNAPSHOT", "jar", null);
|
||||
|
|
|
@ -60,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
*/
|
||||
@PlexusTest
|
||||
public class DefaultWagonManagerTest {
|
||||
class DefaultWagonManagerTest {
|
||||
@Inject
|
||||
private WagonManager wagonManager;
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class DefaultWagonManagerTest {
|
|||
private ArtifactRepositoryFactory artifactRepositoryFactory;
|
||||
|
||||
@Test
|
||||
public void testUnnecessaryRepositoryLookup() throws Exception {
|
||||
void testUnnecessaryRepositoryLookup() throws Exception {
|
||||
Artifact artifact = createTestPomArtifact("target/test-data/get-missing-pom");
|
||||
|
||||
List<ArtifactRepository> repos = new ArrayList<>();
|
||||
|
@ -105,7 +105,7 @@ public class DefaultWagonManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetMissingJar() throws TransferFailedException, UnsupportedProtocolException, IOException {
|
||||
void testGetMissingJar() throws TransferFailedException, UnsupportedProtocolException, IOException {
|
||||
Artifact artifact = createTestArtifact("target/test-data/get-missing-jar", "jar");
|
||||
|
||||
ArtifactRepository repo = createStringRepo();
|
||||
|
@ -116,7 +116,7 @@ public class DefaultWagonManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetMissingJarForced() throws TransferFailedException, UnsupportedProtocolException, IOException {
|
||||
void testGetMissingJarForced() throws TransferFailedException, UnsupportedProtocolException, IOException {
|
||||
Artifact artifact = createTestArtifact("target/test-data/get-missing-jar", "jar");
|
||||
|
||||
ArtifactRepository repo = createStringRepo();
|
||||
|
@ -127,7 +127,7 @@ public class DefaultWagonManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetRemoteJar()
|
||||
void testGetRemoteJar()
|
||||
throws TransferFailedException, ResourceDoesNotExistException, UnsupportedProtocolException, IOException {
|
||||
Artifact artifact = createTestArtifact("target/test-data/get-remote-jar", "jar");
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class DefaultWagonManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultWagonManager() throws Exception {
|
||||
void testDefaultWagonManager() throws Exception {
|
||||
assertWagon("a");
|
||||
|
||||
assertWagon("b");
|
||||
|
@ -214,7 +214,7 @@ public class DefaultWagonManagerTest {
|
|||
* Check that transfer listeners are properly removed after getArtifact and putArtifact
|
||||
*/
|
||||
@Test
|
||||
public void testWagonTransferListenerRemovedAfterGetArtifactAndPutArtifact() throws Exception {
|
||||
void testWagonTransferListenerRemovedAfterGetArtifactAndPutArtifact() throws Exception {
|
||||
Artifact artifact = createTestArtifact("target/test-data/transfer-listener", "jar");
|
||||
ArtifactRepository repo = createStringRepo();
|
||||
StringWagon wagon = (StringWagon) wagonManager.getWagon("string");
|
||||
|
@ -248,7 +248,7 @@ public class DefaultWagonManagerTest {
|
|||
*/
|
||||
@Disabled
|
||||
@Test
|
||||
public void testChecksumVerification() throws Exception {
|
||||
void testChecksumVerification() throws Exception {
|
||||
ArtifactRepositoryPolicy policy = new ArtifactRepositoryPolicy(
|
||||
true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL);
|
||||
|
||||
|
@ -305,7 +305,7 @@ public class DefaultWagonManagerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPerLookupInstantiation() throws Exception {
|
||||
void testPerLookupInstantiation() throws Exception {
|
||||
String protocol = "perlookup";
|
||||
|
||||
Wagon one = wagonManager.getWagon(protocol);
|
||||
|
|
|
@ -39,19 +39,19 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
* @author Benjamin Bentmann
|
||||
*/
|
||||
@PlexusTest
|
||||
public class LegacyRepositorySystemTest {
|
||||
class LegacyRepositorySystemTest {
|
||||
@Inject
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
@Test
|
||||
public void testThatLocalRepositoryWithSpacesIsProperlyHandled() throws Exception {
|
||||
void testThatLocalRepositoryWithSpacesIsProperlyHandled() throws Exception {
|
||||
File basedir = new File("target/spacy path").getAbsoluteFile();
|
||||
ArtifactRepository repo = repositorySystem.createLocalRepository(basedir);
|
||||
assertEquals(basedir, new File(repo.getBasedir()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAuthenticationHandling() {
|
||||
void testAuthenticationHandling() {
|
||||
Server server = new Server();
|
||||
server.setId("repository");
|
||||
server.setUsername("jason");
|
||||
|
|
|
@ -64,7 +64,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
*/
|
||||
@PlexusTest
|
||||
public class DefaultArtifactCollectorTest {
|
||||
class DefaultArtifactCollectorTest {
|
||||
@Inject
|
||||
private LegacyArtifactCollector artifactCollector;
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class DefaultArtifactCollectorTest {
|
|||
private static final String GROUP_ID = "test";
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
source = new Source();
|
||||
|
||||
projectArtifact = createArtifactSpec("project", "1.0", null);
|
||||
|
@ -86,7 +86,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled("works, but we don't fail on cycles presently")
|
||||
public void testCircularDependencyNotIncludingCurrentProject()
|
||||
void testCircularDependencyNotIncludingCurrentProject()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
|
@ -99,7 +99,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled("works, but we don't fail on cycles presently")
|
||||
public void testCircularDependencyIncludingCurrentProject()
|
||||
void testCircularDependencyIncludingCurrentProject()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
|
@ -111,7 +111,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveWithFilter() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveWithFilter() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
ArtifactSpec c = a.addDependency("c", "3.0");
|
||||
|
@ -131,7 +131,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveCorrectDependenciesWhenDifferentDependenciesOnNearest()
|
||||
void testResolveCorrectDependenciesWhenDifferentDependenciesOnNearest()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
|
@ -152,7 +152,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewest()
|
||||
void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewest()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
// TODO use newest conflict resolver
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
|
@ -174,7 +174,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewestVersionReplaced()
|
||||
void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewestVersionReplaced()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
// TODO use newest conflict resolver
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
|
@ -195,8 +195,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveNearestNewestIsNearest()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveNearestNewestIsNearest() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
ArtifactSpec c = a.addDependency("c", "3.0");
|
||||
|
@ -212,8 +211,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveNearestOldestIsNearest()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveNearestOldestIsNearest() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
ArtifactSpec c = a.addDependency("c", "2.0");
|
||||
|
@ -229,8 +227,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveLocalNewestIsLocal()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveLocalNewestIsLocal() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
a.addDependency("b", "2.0");
|
||||
ArtifactSpec b = createArtifactSpec("b", "3.0");
|
||||
|
@ -241,8 +238,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveLocalOldestIsLocal()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveLocalOldestIsLocal() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
a.addDependency("b", "3.0");
|
||||
ArtifactSpec b = createArtifactSpec("b", "2.0");
|
||||
|
@ -253,7 +249,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveLocalWithNewerVersionButLesserScope()
|
||||
void testResolveLocalWithNewerVersionButLesserScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("commons-logging", "1.0");
|
||||
a.addDependency("junit", "3.7");
|
||||
|
@ -267,7 +263,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveLocalWithNewerVersionButLesserScopeResolvedFirst()
|
||||
void testResolveLocalWithNewerVersionButLesserScopeResolvedFirst()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec b = createArtifactSpec("junit", "3.8.1", Artifact.SCOPE_TEST);
|
||||
ArtifactSpec a = createArtifactSpec("commons-logging", "1.0");
|
||||
|
@ -281,8 +277,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveNearestWithRanges()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveNearestWithRanges() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
ArtifactSpec c = a.addDependency("c", "2.0");
|
||||
|
@ -298,8 +293,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveRangeWithManagedVersion()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveRangeWithManagedVersion() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "[1.0,3.0]");
|
||||
|
||||
|
@ -312,7 +306,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCompatibleRanges() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testCompatibleRanges() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
a.addDependency("c", "[2.0,2.5]");
|
||||
|
@ -329,7 +323,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testIncompatibleRanges() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testIncompatibleRanges() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
a.addDependency("c", "[2.4,3.0]");
|
||||
|
@ -342,7 +336,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUnboundedRangeWhenVersionUnavailable()
|
||||
void testUnboundedRangeWhenVersionUnavailable()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = a.addDependency("b", "1.0");
|
||||
|
@ -355,8 +349,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUnboundedRangeBelowLastRelease()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testUnboundedRangeBelowLastRelease() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
createArtifactSpec("c", "1.5");
|
||||
ArtifactSpec c = createArtifactSpec("c", "2.0");
|
||||
|
@ -370,8 +363,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUnboundedRangeAboveLastRelease()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testUnboundedRangeAboveLastRelease() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
createArtifactSpec("c", "2.0");
|
||||
a.addDependency("c", "[10.0,)");
|
||||
|
@ -382,7 +374,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveManagedVersion() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testResolveManagedVersion() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
a.addDependency("b", "3.0", Artifact.SCOPE_RUNTIME);
|
||||
|
||||
|
@ -394,7 +386,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManagementHasDifferentVersion()
|
||||
void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManagementHasDifferentVersion()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
|
||||
|
@ -411,7 +403,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveCompileScopeOverTestScope()
|
||||
void testResolveCompileScopeOverTestScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec c = createArtifactSpec("c", "3.0", Artifact.SCOPE_TEST);
|
||||
|
@ -429,7 +421,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveRuntimeScopeOverTestScope()
|
||||
void testResolveRuntimeScopeOverTestScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec c = createArtifactSpec("c", "3.0", Artifact.SCOPE_TEST);
|
||||
|
@ -447,7 +439,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveCompileScopeOverRuntimeScope()
|
||||
void testResolveCompileScopeOverRuntimeScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec root = createArtifactSpec("root", "1.0");
|
||||
ArtifactSpec a = root.addDependency("a", "1.0");
|
||||
|
@ -467,7 +459,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveCompileScopeOverProvidedScope()
|
||||
void testResolveCompileScopeOverProvidedScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec c = createArtifactSpec("c", "3.0", Artifact.SCOPE_PROVIDED);
|
||||
|
@ -485,7 +477,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResolveRuntimeScopeOverProvidedScope()
|
||||
void testResolveRuntimeScopeOverProvidedScope()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec c = createArtifactSpec("c", "3.0", Artifact.SCOPE_PROVIDED);
|
||||
|
@ -503,8 +495,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testProvidedScopeNotTransitive()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testProvidedScopeNotTransitive() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0", Artifact.SCOPE_PROVIDED);
|
||||
ArtifactSpec b = createArtifactSpec("b", "1.0");
|
||||
b.addDependency("c", "3.0", Artifact.SCOPE_PROVIDED);
|
||||
|
@ -514,7 +505,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOptionalNotTransitive() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testOptionalNotTransitive() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = createArtifactSpec("b", "1.0");
|
||||
b.addDependency("c", "3.0", true);
|
||||
|
@ -524,7 +515,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOptionalIncludedAtRoot() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testOptionalIncludedAtRoot() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
|
||||
ArtifactSpec b = createArtifactSpec("b", "1.0", true);
|
||||
|
@ -534,7 +525,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testScopeUpdate() throws InvalidVersionSpecificationException, ArtifactResolutionException {
|
||||
void testScopeUpdate() throws InvalidVersionSpecificationException, ArtifactResolutionException {
|
||||
/* farthest = compile */
|
||||
checkScopeUpdate(Artifact.SCOPE_COMPILE, Artifact.SCOPE_COMPILE, Artifact.SCOPE_COMPILE);
|
||||
checkScopeUpdate(Artifact.SCOPE_COMPILE, Artifact.SCOPE_PROVIDED, Artifact.SCOPE_COMPILE);
|
||||
|
@ -635,7 +626,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testOptionalNotTransitiveButVersionIsInfluential()
|
||||
void testOptionalNotTransitiveButVersionIsInfluential()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
ArtifactSpec b = createArtifactSpec("b", "1.0");
|
||||
|
@ -656,7 +647,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTestScopeNotTransitive() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testTestScopeNotTransitive() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0", Artifact.SCOPE_TEST);
|
||||
ArtifactSpec b = createArtifactSpec("b", "1.0");
|
||||
b.addDependency("c", "3.0", Artifact.SCOPE_TEST);
|
||||
|
@ -666,7 +657,7 @@ public class DefaultArtifactCollectorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSnapshotNotIncluded() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
void testSnapshotNotIncluded() throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
a.addDependency("b", "[1.0,)");
|
||||
createArtifactSpec("b", "1.0-SNAPSHOT");
|
||||
|
@ -684,7 +675,7 @@ public class DefaultArtifactCollectorTest {
|
|||
|
||||
@Test
|
||||
@Disabled("that one does not work")
|
||||
public void testOverConstrainedVersionException()
|
||||
void testOverConstrainedVersionException()
|
||||
throws ArtifactResolutionException, InvalidVersionSpecificationException {
|
||||
ArtifactSpec a = createArtifactSpec("a", "1.0");
|
||||
a.addDependency("b", "[1.0, 2.0)");
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
|
|||
* @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
|
||||
* @see FarthestConflictResolver
|
||||
*/
|
||||
public class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
// constructors -----------------------------------------------------------
|
||||
|
||||
public FarthestConflictResolverTest() throws Exception {
|
||||
|
@ -44,7 +44,7 @@ public class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepth() {
|
||||
void testDepth() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
|
@ -60,7 +60,7 @@ public class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepthReversed() {
|
||||
void testDepthReversed() {
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
@ -76,7 +76,7 @@ public class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqual() {
|
||||
void testEqual() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class FarthestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqualReversed() {
|
||||
void testEqualReversed() {
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
|
|||
* @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
|
||||
* @see NearestConflictResolver
|
||||
*/
|
||||
public class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
// constructors -----------------------------------------------------------
|
||||
|
||||
public NearestConflictResolverTest() throws Exception {
|
||||
|
@ -44,7 +44,7 @@ public class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepth() {
|
||||
void testDepth() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
|
@ -60,7 +60,7 @@ public class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepthReversed() {
|
||||
void testDepthReversed() {
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
@ -76,7 +76,7 @@ public class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqual() {
|
||||
void testEqual() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class NearestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqualReversed() {
|
||||
void testEqualReversed() {
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
|
|||
* @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
|
||||
* @see NewestConflictResolver
|
||||
*/
|
||||
public class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
// constructors -----------------------------------------------------------
|
||||
|
||||
public NewestConflictResolverTest() throws Exception {
|
||||
|
@ -44,7 +44,7 @@ public class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepth() {
|
||||
void testDepth() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
|
@ -60,7 +60,7 @@ public class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepthReversed() {
|
||||
void testDepthReversed() {
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
@ -76,7 +76,7 @@ public class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqual() {
|
||||
void testEqual() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class NewestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqualReversed() {
|
||||
void testEqualReversed() {
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
|
|||
* @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
|
||||
* @see OldestConflictResolver
|
||||
*/
|
||||
public class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
||||
// constructors -----------------------------------------------------------
|
||||
|
||||
public OldestConflictResolverTest() throws Exception {
|
||||
|
@ -44,7 +44,7 @@ public class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepth() {
|
||||
void testDepth() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
|
@ -60,7 +60,7 @@ public class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testDepthReversed() {
|
||||
void testDepthReversed() {
|
||||
ResolutionNode b1n = createResolutionNode(b1);
|
||||
ResolutionNode a2n = createResolutionNode(a2, b1n);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
@ -76,7 +76,7 @@ public class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqual() {
|
||||
void testEqual() {
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class OldestConflictResolverTest extends AbstractConflictResolverTest {
|
|||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void testEqualReversed() {
|
||||
void testEqualReversed() {
|
||||
ResolutionNode a2n = createResolutionNode(a2);
|
||||
ResolutionNode a1n = createResolutionNode(a1);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
*
|
||||
*/
|
||||
@PlexusTest
|
||||
public class DefaultClasspathTransformationTest {
|
||||
class DefaultClasspathTransformationTest {
|
||||
@Inject
|
||||
ClasspathTransformation transform;
|
||||
|
||||
|
@ -44,9 +44,10 @@ public class DefaultClasspathTransformationTest {
|
|||
MetadataGraphVertex v2;
|
||||
MetadataGraphVertex v3;
|
||||
MetadataGraphVertex v4;
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
graph = new MetadataGraph(4, 3);
|
||||
/*
|
||||
* v2
|
||||
|
@ -72,9 +73,10 @@ public class DefaultClasspathTransformationTest {
|
|||
graph.addEdge(v3, v4, new MetadataGraphEdge("1.1", true, ArtifactScopeEnum.runtime, null, 2, 2));
|
||||
graph.addEdge(v3, v4, new MetadataGraphEdge("1.2", true, ArtifactScopeEnum.test, null, 2, 2));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testCompileClasspathTransform() throws Exception {
|
||||
void testCompileClasspathTransform() throws Exception {
|
||||
ClasspathContainer res;
|
||||
|
||||
res = transform.transform(graph, ArtifactScopeEnum.compile, false);
|
||||
|
@ -83,9 +85,10 @@ public class DefaultClasspathTransformationTest {
|
|||
assertNotNull(res.getClasspath(), "null classpath after compile transform");
|
||||
assertEquals(3, res.getClasspath().size(), "compile classpath should have 3 entries");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testRuntimeClasspathTransform() throws Exception {
|
||||
void testRuntimeClasspathTransform() throws Exception {
|
||||
ClasspathContainer res;
|
||||
|
||||
res = transform.transform(graph, ArtifactScopeEnum.runtime, false);
|
||||
|
@ -97,9 +100,10 @@ public class DefaultClasspathTransformationTest {
|
|||
ArtifactMetadata md = res.getClasspath().get(3);
|
||||
assertEquals("1.1", md.getVersion(), "runtime artifact version should be 1.1");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testTestClasspathTransform() throws Exception {
|
||||
void testTestClasspathTransform() throws Exception {
|
||||
ClasspathContainer res;
|
||||
|
||||
res = transform.transform(graph, ArtifactScopeEnum.test, false);
|
||||
|
|
|
@ -28,22 +28,24 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
* @author <a href="mailto:oleg@codehaus.org">Oleg Gusakov</a>
|
||||
*
|
||||
*/
|
||||
public class DefaultGraphConflictResolutionPolicyTest {
|
||||
class DefaultGraphConflictResolutionPolicyTest {
|
||||
GraphConflictResolutionPolicy policy;
|
||||
MetadataGraphEdge e1;
|
||||
MetadataGraphEdge e2;
|
||||
MetadataGraphEdge e3;
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
policy = new DefaultGraphConflictResolutionPolicy();
|
||||
e1 = new MetadataGraphEdge("1.1", true, null, null, 2, 1);
|
||||
e2 = new MetadataGraphEdge("1.2", true, null, null, 3, 2);
|
||||
e3 = new MetadataGraphEdge("1.2", true, null, null, 2, 3);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testDefaultPolicy() throws Exception {
|
||||
void testDefaultPolicy() throws Exception {
|
||||
MetadataGraphEdge res;
|
||||
|
||||
res = policy.apply(e1, e2);
|
||||
|
|
|
@ -34,7 +34,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
*
|
||||
*/
|
||||
@PlexusTest
|
||||
public class DefaultGraphConflictResolverTest {
|
||||
class DefaultGraphConflictResolverTest {
|
||||
@Inject
|
||||
GraphConflictResolver resolver;
|
||||
|
||||
|
@ -44,9 +44,10 @@ public class DefaultGraphConflictResolverTest {
|
|||
MetadataGraphVertex v2;
|
||||
MetadataGraphVertex v3;
|
||||
MetadataGraphVertex v4;
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
/*
|
||||
* v2
|
||||
* v1<
|
||||
|
@ -72,9 +73,10 @@ public class DefaultGraphConflictResolverTest {
|
|||
graph.addEdge(v3, v4, new MetadataGraphEdge("1.1", true, ArtifactScopeEnum.runtime, null, 2, 1));
|
||||
graph.addEdge(v3, v4, new MetadataGraphEdge("1.2", true, ArtifactScopeEnum.provided, null, 2, 2));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testCompileResolution() throws Exception {
|
||||
void testCompileResolution() throws Exception {
|
||||
MetadataGraph res;
|
||||
|
||||
res = resolver.resolveConflicts(graph, ArtifactScopeEnum.compile);
|
||||
|
@ -113,9 +115,10 @@ public class DefaultGraphConflictResolverTest {
|
|||
res.getIncidentEdges(v4).get(0).getVersion(),
|
||||
"wrong edge v3-v4 in the resulting graph after resolver");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testRuntimeResolution() throws Exception {
|
||||
void testRuntimeResolution() throws Exception {
|
||||
MetadataGraph res;
|
||||
|
||||
res = resolver.resolveConflicts(graph, ArtifactScopeEnum.runtime);
|
||||
|
@ -153,9 +156,10 @@ public class DefaultGraphConflictResolverTest {
|
|||
res.getIncidentEdges(v4).get(0).getVersion(),
|
||||
"wrong edge v3-v4 in the resulting graph after resolver");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@Test
|
||||
public void testTestResolution() throws Exception {
|
||||
void testTestResolution() throws Exception {
|
||||
MetadataGraph res;
|
||||
|
||||
res = resolver.resolveConflicts(graph, ArtifactScopeEnum.test);
|
||||
|
|
|
@ -41,7 +41,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class DefaultMavenTest extends AbstractCoreMavenComponentTestCase {
|
||||
class DefaultMavenTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Singleton
|
||||
@Named("WsrClassCatcher")
|
||||
private static final class WsrClassCatcher extends AbstractMavenLifecycleParticipant {
|
||||
|
@ -62,7 +62,7 @@ public class DefaultMavenTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEnsureResolverSessionHasMavenWorkspaceReader() throws Exception {
|
||||
void testEnsureResolverSessionHasMavenWorkspaceReader() throws Exception {
|
||||
WsrClassCatcher wsrClassCatcher =
|
||||
(WsrClassCatcher) getContainer().lookup(AbstractMavenLifecycleParticipant.class, "WsrClassCatcher");
|
||||
Maven maven = getContainer().lookup(Maven.class);
|
||||
|
@ -77,7 +77,7 @@ public class DefaultMavenTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws Exception {
|
||||
void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws Exception {
|
||||
MavenExecutionRequest request =
|
||||
createMavenExecutionRequest(getProject("cyclic-reference")).setGoals(asList("validate"));
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class DefaultMavenTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMavenProjectNoDuplicateArtifacts() throws Exception {
|
||||
void testMavenProjectNoDuplicateArtifacts() throws Exception {
|
||||
MavenProjectHelper mavenProjectHelper = getContainer().lookup(MavenProjectHelper.class);
|
||||
MavenProject mavenProject = new MavenProject();
|
||||
mavenProject.setArtifact(new DefaultArtifact("g", "a", "1.0", Artifact.SCOPE_TEST, "jar", "", null));
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
public class MavenLifecycleParticipantTest extends AbstractCoreMavenComponentTestCase {
|
||||
class MavenLifecycleParticipantTest extends AbstractCoreMavenComponentTestCase {
|
||||
|
||||
private static final String INJECTED_ARTIFACT_ID = "injected";
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class MavenLifecycleParticipantTest extends AbstractCoreMavenComponentTes
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDependencyInjection() throws Exception {
|
||||
void testDependencyInjection() throws Exception {
|
||||
PlexusContainer container = getContainer();
|
||||
|
||||
ComponentDescriptor<? extends AbstractMavenLifecycleParticipant> cd =
|
||||
|
@ -122,7 +122,7 @@ public class MavenLifecycleParticipantTest extends AbstractCoreMavenComponentTes
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReactorDependencyInjection() throws Exception {
|
||||
void testReactorDependencyInjection() throws Exception {
|
||||
List<String> reactorOrder =
|
||||
getReactorOrder("lifecycle-participant-reactor-dependency-injection", InjectReactorDependency.class);
|
||||
assertEquals(Arrays.asList("parent", "module-b", "module-a"), reactorOrder);
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.Matchers.endsWith;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class ProjectDependenciesResolverTest extends AbstractCoreMavenComponentTestCase {
|
||||
class ProjectDependenciesResolverTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private ProjectDependenciesResolver resolver;
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class ProjectDependenciesResolverTest extends AbstractCoreMavenComponentT
|
|||
*/
|
||||
|
||||
@Test
|
||||
public void testSystemScopeDependencies() throws Exception {
|
||||
void testSystemScopeDependencies() throws Exception {
|
||||
MavenSession session = createMavenSession(null);
|
||||
MavenProject project = session.getCurrentProject();
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class ProjectDependenciesResolverTest extends AbstractCoreMavenComponentT
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSystemScopeDependencyIsPresentInTheCompileClasspathElements() throws Exception {
|
||||
void testSystemScopeDependencyIsPresentInTheCompileClasspathElements() throws Exception {
|
||||
File pom = getProject("it0063");
|
||||
|
||||
Properties eps = new Properties();
|
||||
|
|
|
@ -32,12 +32,12 @@ import static org.codehaus.plexus.testing.PlexusExtension.getTestFile;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@PlexusTest
|
||||
public class ArtifactHandlerTest {
|
||||
class ArtifactHandlerTest {
|
||||
@Inject
|
||||
PlexusContainer container;
|
||||
|
||||
@Test
|
||||
public void testAptConsistency() throws Exception {
|
||||
void testAptConsistency() throws Exception {
|
||||
File apt = getTestFile("src/site/apt/artifact-handlers.apt");
|
||||
|
||||
List<String> lines = Files.readAllLines(apt.toPath());
|
||||
|
|
|
@ -31,18 +31,18 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class ExclusionArtifactFilterTest {
|
||||
class ExclusionArtifactFilterTest {
|
||||
private Artifact artifact;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
artifact = mock(Artifact.class);
|
||||
when(artifact.getGroupId()).thenReturn("org.apache.maven");
|
||||
when(artifact.getArtifactId()).thenReturn("maven-core");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeExact() {
|
||||
void testExcludeExact() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("org.apache.maven");
|
||||
exclusion.setArtifactId("maven-core");
|
||||
|
@ -52,7 +52,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeNoMatch() {
|
||||
void testExcludeNoMatch() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("org.apache.maven");
|
||||
exclusion.setArtifactId("maven-model");
|
||||
|
@ -62,7 +62,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeGroupIdWildcard() {
|
||||
void testExcludeGroupIdWildcard() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("*");
|
||||
exclusion.setArtifactId("maven-core");
|
||||
|
@ -72,7 +72,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeGroupIdWildcardNoMatch() {
|
||||
void testExcludeGroupIdWildcardNoMatch() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("*");
|
||||
exclusion.setArtifactId("maven-compat");
|
||||
|
@ -82,7 +82,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeArtifactIdWildcard() {
|
||||
void testExcludeArtifactIdWildcard() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("org.apache.maven");
|
||||
exclusion.setArtifactId("*");
|
||||
|
@ -92,7 +92,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeArtifactIdWildcardNoMatch() {
|
||||
void testExcludeArtifactIdWildcardNoMatch() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("org.apache.groovy");
|
||||
exclusion.setArtifactId("*");
|
||||
|
@ -102,7 +102,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExcludeAllWildcard() {
|
||||
void testExcludeAllWildcard() {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("*");
|
||||
exclusion.setArtifactId("*");
|
||||
|
@ -112,7 +112,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleExclusionsExcludeArtifactIdWildcard() {
|
||||
void testMultipleExclusionsExcludeArtifactIdWildcard() {
|
||||
Exclusion exclusion1 = new Exclusion();
|
||||
exclusion1.setGroupId("org.apache.groovy");
|
||||
exclusion1.setArtifactId("*");
|
||||
|
@ -127,7 +127,7 @@ public class ExclusionArtifactFilterTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleExclusionsExcludeGroupIdWildcard() {
|
||||
void testMultipleExclusionsExcludeGroupIdWildcard() {
|
||||
Exclusion exclusion1 = new Exclusion();
|
||||
exclusion1.setGroupId("*");
|
||||
exclusion1.setArtifactId("maven-model");
|
||||
|
|
|
@ -37,17 +37,17 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class DefaultBeanConfiguratorPathTest {
|
||||
class DefaultBeanConfiguratorPathTest {
|
||||
|
||||
private BeanConfigurator configurator;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
configurator = new DefaultBeanConfigurator();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() throws Exception {
|
||||
void tearDown() throws Exception {
|
||||
configurator = null;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class DefaultBeanConfiguratorPathTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMinimal() throws BeanConfigurationException {
|
||||
void testMinimal() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<file>test</file>");
|
||||
|
@ -74,7 +74,7 @@ public class DefaultBeanConfiguratorPathTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPreAndPostProcessing() throws BeanConfigurationException {
|
||||
void testPreAndPostProcessing() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<file>${test}</file>");
|
||||
|
@ -98,7 +98,7 @@ public class DefaultBeanConfiguratorPathTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChildConfigurationElement() throws BeanConfigurationException {
|
||||
void testChildConfigurationElement() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<wrapper><file>test</file></wrapper>");
|
||||
|
|
|
@ -35,17 +35,17 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class DefaultBeanConfiguratorTest {
|
||||
class DefaultBeanConfiguratorTest {
|
||||
|
||||
private BeanConfigurator configurator;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
void setUp() throws Exception {
|
||||
configurator = new DefaultBeanConfigurator();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() throws Exception {
|
||||
void tearDown() throws Exception {
|
||||
configurator = null;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class DefaultBeanConfiguratorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMinimal() throws BeanConfigurationException {
|
||||
void testMinimal() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<file>test</file>");
|
||||
|
@ -72,7 +72,7 @@ public class DefaultBeanConfiguratorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPreAndPostProcessing() throws BeanConfigurationException {
|
||||
void testPreAndPostProcessing() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<file>${test}</file>");
|
||||
|
@ -96,7 +96,7 @@ public class DefaultBeanConfiguratorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChildConfigurationElement() throws BeanConfigurationException {
|
||||
void testChildConfigurationElement() throws BeanConfigurationException {
|
||||
SomeBean bean = new SomeBean();
|
||||
|
||||
Xpp3Dom config = toConfig("<wrapper><file>test</file></wrapper>");
|
||||
|
|
|
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author <a href="mailto:baerrach@apache.org">Barrie Treloar</a>
|
||||
*/
|
||||
public class DefaultExceptionHandlerTest {
|
||||
class DefaultExceptionHandlerTest {
|
||||
/**
|
||||
* Running Maven under JDK7 may cause connection issues because IPv6 is used by default.
|
||||
* <p>
|
||||
|
@ -47,7 +47,7 @@ public class DefaultExceptionHandlerTest {
|
|||
* </p>
|
||||
*/
|
||||
@Test
|
||||
public void testJdk7ipv6() {
|
||||
void testJdk7ipv6() {
|
||||
ConnectException connEx = new ConnectException("Connection refused: connect");
|
||||
IOException ioEx = new IOException("Unable to establish loopback connection", connEx);
|
||||
MojoExecutionException mojoEx =
|
||||
|
@ -61,7 +61,7 @@ public class DefaultExceptionHandlerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHandleExceptionAetherClassNotFound() {
|
||||
void testHandleExceptionAetherClassNotFound() {
|
||||
Throwable cause2 = new NoClassDefFoundError("org/sonatype/aether/RepositorySystem");
|
||||
Plugin plugin = new Plugin();
|
||||
Exception cause = new PluginContainerException(plugin, null, null, cause2);
|
||||
|
@ -79,7 +79,7 @@ public class DefaultExceptionHandlerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHandleExceptionNoClassDefFoundErrorNull() {
|
||||
void testHandleExceptionNoClassDefFoundErrorNull() {
|
||||
Throwable cause2 = new NoClassDefFoundError();
|
||||
Plugin plugin = new Plugin();
|
||||
Exception cause = new PluginContainerException(plugin, null, null, cause2);
|
||||
|
|
|
@ -31,18 +31,18 @@ import static java.util.Collections.singletonList;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
public class DefaultBuildResumptionAnalyzerTest {
|
||||
class DefaultBuildResumptionAnalyzerTest {
|
||||
private final DefaultBuildResumptionAnalyzer analyzer = new DefaultBuildResumptionAnalyzer();
|
||||
|
||||
private MavenExecutionResult executionResult;
|
||||
|
||||
@BeforeEach
|
||||
public void before() {
|
||||
void before() {
|
||||
executionResult = new DefaultMavenExecutionResult();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resumeFromGetsDetermined() {
|
||||
void resumeFromGetsDetermined() {
|
||||
MavenProject projectA = createSucceededMavenProject("A");
|
||||
MavenProject projectB = createFailedMavenProject("B");
|
||||
executionResult.setTopologicallySortedProjects(asList(projectA, projectB));
|
||||
|
@ -54,7 +54,7 @@ public class DefaultBuildResumptionAnalyzerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void resumeFromIsIgnoredWhenFirstProjectFails() {
|
||||
void resumeFromIsIgnoredWhenFirstProjectFails() {
|
||||
MavenProject projectA = createFailedMavenProject("A");
|
||||
MavenProject projectB = createMavenProject("B");
|
||||
executionResult.setTopologicallySortedProjects(asList(projectA, projectB));
|
||||
|
@ -65,7 +65,7 @@ public class DefaultBuildResumptionAnalyzerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void projectsSucceedingAfterFailedProjectsAreExcluded() {
|
||||
void projectsSucceedingAfterFailedProjectsAreExcluded() {
|
||||
MavenProject projectA = createSucceededMavenProject("A");
|
||||
MavenProject projectB = createFailedMavenProject("B");
|
||||
MavenProject projectC = createSucceededMavenProject("C");
|
||||
|
@ -78,7 +78,7 @@ public class DefaultBuildResumptionAnalyzerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void projectsDependingOnFailedProjectsAreNotExcluded() {
|
||||
void projectsDependingOnFailedProjectsAreNotExcluded() {
|
||||
MavenProject projectA = createSucceededMavenProject("A");
|
||||
MavenProject projectB = createFailedMavenProject("B");
|
||||
MavenProject projectC = createSkippedMavenProject("C");
|
||||
|
@ -92,7 +92,7 @@ public class DefaultBuildResumptionAnalyzerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void projectsFailingAfterAnotherFailedProjectAreNotExcluded() {
|
||||
void projectsFailingAfterAnotherFailedProjectAreNotExcluded() {
|
||||
MavenProject projectA = createSucceededMavenProject("A");
|
||||
MavenProject projectB = createFailedMavenProject("B");
|
||||
MavenProject projectC = createSucceededMavenProject("C");
|
||||
|
|
|
@ -32,11 +32,11 @@ import static org.hamcrest.Matchers.containsInAnyOrder;
|
|||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
public class DefaultBuildResumptionDataRepositoryTest {
|
||||
class DefaultBuildResumptionDataRepositoryTest {
|
||||
private final DefaultBuildResumptionDataRepository repository = new DefaultBuildResumptionDataRepository();
|
||||
|
||||
@Test
|
||||
public void resumeFromPropertyGetsApplied() {
|
||||
void resumeFromPropertyGetsApplied() {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("remainingProjects", ":module-a");
|
||||
|
@ -47,7 +47,7 @@ public class DefaultBuildResumptionDataRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void resumeFromPropertyDoesNotOverrideExistingRequestParameters() {
|
||||
void resumeFromPropertyDoesNotOverrideExistingRequestParameters() {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
request.setResumeFrom(":module-b");
|
||||
Properties properties = new Properties();
|
||||
|
@ -59,7 +59,7 @@ public class DefaultBuildResumptionDataRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void projectsFromPropertyGetsAddedToExistingRequestParameters() {
|
||||
void projectsFromPropertyGetsAddedToExistingRequestParameters() {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
List<String> selectedProjects = new ArrayList<>();
|
||||
selectedProjects.add(":module-a");
|
||||
|
@ -75,7 +75,7 @@ public class DefaultBuildResumptionDataRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void selectedProjectsAreNotAddedWhenPropertyValueIsEmpty() {
|
||||
void selectedProjectsAreNotAddedWhenPropertyValueIsEmpty() {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("remainingProjects", "");
|
||||
|
@ -86,7 +86,7 @@ public class DefaultBuildResumptionDataRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void applyResumptionData_shouldLoadData() {
|
||||
void applyResumptionData_shouldLoadData() {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
Build build = new Build();
|
||||
build.setDirectory("src/test/resources/org/apache/maven/execution/");
|
||||
|
|
|
@ -32,12 +32,12 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@PlexusTest
|
||||
public class DefaultMavenExecutionRequestPopulatorTest {
|
||||
class DefaultMavenExecutionRequestPopulatorTest {
|
||||
@Inject
|
||||
MavenExecutionRequestPopulator testee;
|
||||
|
||||
@Test
|
||||
public void testPluginRepositoryInjection() throws Exception {
|
||||
void testPluginRepositoryInjection() throws Exception {
|
||||
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
|
||||
|
||||
Repository r = new Repository();
|
||||
|
|
|
@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.assertNotSame;
|
|||
/**
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class DefaultMavenExecutionTest {
|
||||
class DefaultMavenExecutionTest {
|
||||
@Test
|
||||
public void testCopyDefault() {
|
||||
void testCopyDefault() {
|
||||
MavenExecutionRequest original = new DefaultMavenExecutionRequest();
|
||||
MavenExecutionRequest copy = DefaultMavenExecutionRequest.copy(original);
|
||||
assertNotNull(copy);
|
||||
|
@ -42,7 +42,7 @@ public class DefaultMavenExecutionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testResultWithNullTopologicallySortedProjectsIsEmptyList() {
|
||||
void testResultWithNullTopologicallySortedProjectsIsEmptyList() {
|
||||
MavenExecutionResult result = new DefaultMavenExecutionResult();
|
||||
result.setTopologicallySortedProjects(null);
|
||||
List<MavenProject> projects = result.getTopologicallySortedProjects();
|
||||
|
|
|
@ -30,9 +30,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class MojoExecutionScopeTest {
|
||||
class MojoExecutionScopeTest {
|
||||
@Test
|
||||
public void testNestedEnter() throws Exception {
|
||||
void testNestedEnter() throws Exception {
|
||||
MojoExecutionScope scope = new MojoExecutionScope();
|
||||
|
||||
scope.enter();
|
||||
|
@ -55,7 +55,7 @@ public class MojoExecutionScopeTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMultiKeyInstance() throws Exception {
|
||||
void testMultiKeyInstance() throws Exception {
|
||||
MojoExecutionScope scope = new MojoExecutionScope();
|
||||
scope.enter();
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ class DefaultGraphBuilderTest {
|
|||
}
|
||||
|
||||
@BeforeEach
|
||||
public void before() throws Exception {
|
||||
void before() throws Exception {
|
||||
graphBuilder = new DefaultGraphBuilder(
|
||||
mock(BuildResumptionDataRepository.class),
|
||||
pomlessCollectionStrategy,
|
||||
|
|
|
@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class DefaultProjectDependencyGraphTest {
|
||||
class DefaultProjectDependencyGraphTest {
|
||||
|
||||
private final MavenProject aProject = createA();
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
private final MavenProject transitiveOnly = createProject(Arrays.asList(toDependency(depender3)), "depender5");
|
||||
|
||||
@Test
|
||||
public void testGetSortedProjects() throws DuplicateProjectException, CycleDetectedException {
|
||||
void testGetSortedProjects() throws DuplicateProjectException, CycleDetectedException {
|
||||
ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(Arrays.asList(depender1, aProject));
|
||||
final List<MavenProject> sortedProjects = graph.getSortedProjects();
|
||||
assertEquals(aProject, sortedProjects.get(0));
|
||||
|
@ -57,7 +57,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVerifyExpectedParentStructure() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testVerifyExpectedParentStructure() throws CycleDetectedException, DuplicateProjectException {
|
||||
// This test verifies the baseline structure used in subsequent tests. If this fails, the rest will fail.
|
||||
ProjectDependencyGraph graph = threeProjectsDependingOnASingle();
|
||||
final List<MavenProject> sortedProjects = graph.getSortedProjects();
|
||||
|
@ -68,8 +68,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testVerifyThatDownstreamProjectsComeInSortedOrder()
|
||||
throws CycleDetectedException, DuplicateProjectException {
|
||||
void testVerifyThatDownstreamProjectsComeInSortedOrder() throws CycleDetectedException, DuplicateProjectException {
|
||||
final List<MavenProject> downstreamProjects =
|
||||
threeProjectsDependingOnASingle().getDownstreamProjects(aProject, true);
|
||||
assertEquals(depender1, downstreamProjects.get(0));
|
||||
|
@ -78,7 +77,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTransitivesInOrder() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testTransitivesInOrder() throws CycleDetectedException, DuplicateProjectException {
|
||||
final ProjectDependencyGraph graph =
|
||||
new DefaultProjectDependencyGraph(Arrays.asList(depender1, depender4, depender2, depender3, aProject));
|
||||
|
||||
|
@ -90,7 +89,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNonTransitivesInOrder() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testNonTransitivesInOrder() throws CycleDetectedException, DuplicateProjectException {
|
||||
final ProjectDependencyGraph graph =
|
||||
new DefaultProjectDependencyGraph(Arrays.asList(depender1, depender4, depender2, depender3, aProject));
|
||||
|
||||
|
@ -102,7 +101,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWithTransitiveOnly() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testWithTransitiveOnly() throws CycleDetectedException, DuplicateProjectException {
|
||||
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
||||
Arrays.asList(depender1, transitiveOnly, depender2, depender3, aProject));
|
||||
|
||||
|
@ -114,7 +113,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWithMissingTransitiveOnly() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testWithMissingTransitiveOnly() throws CycleDetectedException, DuplicateProjectException {
|
||||
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
||||
Arrays.asList(depender1, transitiveOnly, depender2, depender3, aProject));
|
||||
|
||||
|
@ -125,7 +124,7 @@ public class DefaultProjectDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetUpstreamProjects() throws CycleDetectedException, DuplicateProjectException {
|
||||
void testGetUpstreamProjects() throws CycleDetectedException, DuplicateProjectException {
|
||||
ProjectDependencyGraph graph = threeProjectsDependingOnASingle();
|
||||
final List<MavenProject> downstreamProjects = graph.getUpstreamProjects(depender1, true);
|
||||
assertEquals(aProject, downstreamProjects.get(0));
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class MultilineMessageHelperTest {
|
||||
class MultilineMessageHelperTest {
|
||||
|
||||
@Test
|
||||
public void testBuilderCommon() {
|
||||
void testBuilderCommon() {
|
||||
List<String> msgs = new ArrayList<>();
|
||||
msgs.add("*****************************************************************");
|
||||
msgs.add("* Your build is requesting parallel execution, but project *");
|
||||
|
@ -51,7 +51,7 @@ public class MultilineMessageHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMojoExecutor() {
|
||||
void testMojoExecutor() {
|
||||
List<String> msgs = new ArrayList<>();
|
||||
msgs.add("*****************************************************************");
|
||||
msgs.add("* An aggregator Mojo is already executing in parallel build, *");
|
||||
|
|
|
@ -37,9 +37,9 @@ import static org.mockito.Mockito.when;
|
|||
/**
|
||||
* UT for {@link ReverseTreeRepositoryListener}.
|
||||
*/
|
||||
public class ReverseTreeRepositoryListenerTest {
|
||||
class ReverseTreeRepositoryListenerTest {
|
||||
@Test
|
||||
public void isLocalRepositoryArtifactTest() {
|
||||
void isLocalRepositoryArtifactTest() {
|
||||
File baseDir = new File("local/repository");
|
||||
LocalRepository localRepository = new LocalRepository(baseDir);
|
||||
RepositorySystemSession session = mock(RepositorySystemSession.class);
|
||||
|
@ -60,7 +60,7 @@ public class ReverseTreeRepositoryListenerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void isMissingArtifactTest() {
|
||||
void isMissingArtifactTest() {
|
||||
File baseDir = new File("local/repository");
|
||||
LocalRepository localRepository = new LocalRepository(baseDir);
|
||||
RepositorySystemSession session = mock(RepositorySystemSession.class);
|
||||
|
@ -75,7 +75,7 @@ public class ReverseTreeRepositoryListenerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void lookupCollectStepDataTest() {
|
||||
void lookupCollectStepDataTest() {
|
||||
RequestTrace doesNotHaveIt =
|
||||
RequestTrace.newChild(null, "foo").newChild("bar").newChild("baz");
|
||||
assertThat(ReverseTreeRepositoryListener.lookupCollectStepData(doesNotHaveIt), nullValue());
|
||||
|
|
|
@ -32,10 +32,10 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class PropertiesAsMapTest {
|
||||
class PropertiesAsMapTest {
|
||||
|
||||
@Test
|
||||
public void testPropertiesAsMap() {
|
||||
void testPropertiesAsMap() {
|
||||
Properties props = new Properties();
|
||||
props.setProperty("foo1", "bar1");
|
||||
props.setProperty("foo2", "bar2");
|
||||
|
|
|
@ -55,7 +55,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@PlexusTest
|
||||
public class TestApi {
|
||||
class TestApi {
|
||||
|
||||
Session session;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import org.apache.maven.model.building.TransformerContext;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.xmlunit.assertj.XmlAssert;
|
||||
|
||||
public class ConsumerPomArtifactTransformerTest {
|
||||
class ConsumerPomArtifactTransformerTest {
|
||||
@Test
|
||||
public void transform() throws Exception {
|
||||
void transform() throws Exception {
|
||||
Path beforePomFile =
|
||||
Paths.get("src/test/resources/projects/transform/before.pom").toAbsolutePath();
|
||||
Path afterPomFile =
|
||||
|
|
|
@ -43,47 +43,47 @@ import static org.mockito.Mockito.when;
|
|||
* @author Kristian Rosenvold
|
||||
*/
|
||||
@PlexusTest
|
||||
public class DefaultLifecyclesTest {
|
||||
class DefaultLifecyclesTest {
|
||||
@Inject
|
||||
private DefaultLifecycles defaultLifeCycles;
|
||||
|
||||
@Test
|
||||
public void testDefaultLifecycles() {
|
||||
void testDefaultLifecycles() {
|
||||
final List<Lifecycle> lifecycles = defaultLifeCycles.getLifeCycles();
|
||||
assertThat(lifecycles, hasSize(4));
|
||||
assertThat(DefaultLifecycles.STANDARD_LIFECYCLES, arrayWithSize(4));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultLifecycle() {
|
||||
void testDefaultLifecycle() {
|
||||
final Lifecycle lifecycle = getLifeCycleById("default");
|
||||
assertThat(lifecycle.getId(), is("default"));
|
||||
assertThat(lifecycle.getPhases(), hasSize(23));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCleanLifecycle() {
|
||||
void testCleanLifecycle() {
|
||||
final Lifecycle lifecycle = getLifeCycleById("clean");
|
||||
assertThat(lifecycle.getId(), is("clean"));
|
||||
assertThat(lifecycle.getPhases(), hasSize(3));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSiteLifecycle() {
|
||||
void testSiteLifecycle() {
|
||||
final Lifecycle lifecycle = getLifeCycleById("site");
|
||||
assertThat(lifecycle.getId(), is("site"));
|
||||
assertThat(lifecycle.getPhases(), hasSize(4));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWrapperLifecycle() {
|
||||
void testWrapperLifecycle() {
|
||||
final Lifecycle lifecycle = getLifeCycleById("wrapper");
|
||||
assertThat(lifecycle.getId(), is("wrapper"));
|
||||
assertThat(lifecycle.getPhases(), hasSize(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomLifecycle() throws ComponentLookupException {
|
||||
void testCustomLifecycle() throws ComponentLookupException {
|
||||
List<Lifecycle> myLifecycles = new ArrayList<>();
|
||||
Lifecycle myLifecycle =
|
||||
new Lifecycle("etl", Arrays.asList("extract", "transform", "load"), Collections.emptyMap());
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
*
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentTestCase {
|
||||
class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private DefaultLifecycles defaultLifeCycles;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentT
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreation() throws Exception {
|
||||
void testCreation() throws Exception {
|
||||
assertNotNull(defaultLifeCycles);
|
||||
assertNotNull(mojoExecutor);
|
||||
assertNotNull(lifeCycleBuilder);
|
||||
|
|
|
@ -56,7 +56,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
||||
class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private DefaultLifecycleExecutor lifecycleExecutor;
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
@Test
|
||||
public void testCalculationOfBuildPlanWithIndividualTaskWherePluginIsSpecifiedInThePom() throws Exception {
|
||||
void testCalculationOfBuildPlanWithIndividualTaskWherePluginIsSpecifiedInThePom() throws Exception {
|
||||
// We are doing something like "mvn resources:resources" where no version is specified but this
|
||||
// project we are working on has the version specified in the POM so the version should come from there.
|
||||
File pom = getProject("project-basic");
|
||||
|
@ -100,7 +100,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCalculationOfBuildPlanWithIndividualTaskOfTheCleanLifecycle() throws Exception {
|
||||
void testCalculationOfBuildPlanWithIndividualTaskOfTheCleanLifecycle() throws Exception {
|
||||
// We are doing something like "mvn clean:clean" where no version is specified but this
|
||||
// project we are working on has the version specified in the POM so the version should come from there.
|
||||
File pom = getProject("project-basic");
|
||||
|
@ -122,7 +122,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCalculationOfBuildPlanWithIndividualTaskOfTheCleanCleanGoal() throws Exception {
|
||||
void testCalculationOfBuildPlanWithIndividualTaskOfTheCleanCleanGoal() throws Exception {
|
||||
// We are doing something like "mvn clean:clean" where no version is specified but this
|
||||
// project we are working on has the version specified in the POM so the version should come from there.
|
||||
File pom = getProject("project-basic");
|
||||
|
@ -258,7 +258,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLifecycleQueryingUsingADefaultLifecyclePhase() throws Exception {
|
||||
void testLifecycleQueryingUsingADefaultLifecyclePhase() throws Exception {
|
||||
File pom = getProject("project-with-additional-lifecycle-elements");
|
||||
MavenSession session = createMavenSession(pom);
|
||||
assertEquals(
|
||||
|
@ -297,14 +297,14 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLifecyclePluginsRetrievalForDefaultLifecycle() throws Exception {
|
||||
void testLifecyclePluginsRetrievalForDefaultLifecycle() throws Exception {
|
||||
List<Plugin> plugins = new ArrayList<>(lifecycleExecutor.getPluginsBoundByDefaultToAllLifecycles("jar"));
|
||||
|
||||
assertThat(plugins.toString(), plugins, hasSize(9));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPluginConfigurationCreation() throws Exception {
|
||||
void testPluginConfigurationCreation() throws Exception {
|
||||
File pom = getProject("project-with-additional-lifecycle-elements");
|
||||
MavenSession session = createMavenSession(pom);
|
||||
MojoDescriptor mojoDescriptor = mojoDescriptorCreator.getMojoDescriptor(
|
||||
|
@ -328,7 +328,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidGoalName() throws Exception {
|
||||
void testInvalidGoalName() throws Exception {
|
||||
File pom = getProject("project-basic");
|
||||
MavenSession session = createMavenSession(pom);
|
||||
MojoNotFoundException e = assertThrows(
|
||||
|
@ -346,7 +346,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginPrefixRetrieval() throws Exception {
|
||||
void testPluginPrefixRetrieval() throws Exception {
|
||||
File pom = getProject("project-basic");
|
||||
MavenSession session = createMavenSession(pom);
|
||||
Plugin plugin = mojoDescriptorCreator.findPluginForPrefix("resources", session);
|
||||
|
@ -357,7 +357,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
// Prefixes
|
||||
|
||||
@Test
|
||||
public void testFindingPluginPrefixForCleanClean() throws Exception {
|
||||
void testFindingPluginPrefixForCleanClean() throws Exception {
|
||||
File pom = getProject("project-basic");
|
||||
MavenSession session = createMavenSession(pom);
|
||||
Plugin plugin = mojoDescriptorCreator.findPluginForPrefix("clean", session);
|
||||
|
@ -365,7 +365,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetupMojoExecution() throws Exception {
|
||||
void testSetupMojoExecution() throws Exception {
|
||||
File pom = getProject("mojo-configuration");
|
||||
|
||||
MavenSession session = createMavenSession(pom);
|
||||
|
@ -385,7 +385,7 @@ public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExecutionListeners() throws Exception {
|
||||
void testExecutionListeners() throws Exception {
|
||||
final File pom = getProject("project-basic");
|
||||
final MavenSession session = createMavenSession(pom);
|
||||
session.setProjectDependencyGraph(new ProjectDependencyGraph() {
|
||||
|
|
|
@ -32,10 +32,10 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class MavenExecutionPlanTest {
|
||||
class MavenExecutionPlanTest {
|
||||
|
||||
@Test
|
||||
public void testFindLastInPhase() throws Exception {
|
||||
void testFindLastInPhase() throws Exception {
|
||||
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
|
||||
|
||||
ExecutionPlanItem expected = plan.findLastInPhase("package");
|
||||
|
@ -45,7 +45,7 @@ public class MavenExecutionPlanTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testThreadSafeMojos() throws Exception {
|
||||
void testThreadSafeMojos() throws Exception {
|
||||
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
|
||||
final Set<Plugin> unSafePlugins = plan.getNonThreadSafePlugins();
|
||||
// There is only a single threadsafe plugin here...
|
||||
|
@ -53,7 +53,7 @@ public class MavenExecutionPlanTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFindLastWhenFirst() throws Exception {
|
||||
void testFindLastWhenFirst() throws Exception {
|
||||
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
|
||||
|
||||
ExecutionPlanItem beerPhase = plan.findLastInPhase(
|
||||
|
@ -62,7 +62,7 @@ public class MavenExecutionPlanTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFindLastInPhaseMisc() throws Exception {
|
||||
void testFindLastInPhaseMisc() throws Exception {
|
||||
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
|
||||
|
||||
assertNull(plan.findLastInPhase("pacXkage"));
|
||||
|
|
|
@ -29,10 +29,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
public class BuildListCalculatorTest {
|
||||
class BuildListCalculatorTest {
|
||||
|
||||
@Test
|
||||
public void testCalculateProjectBuilds() throws Exception {
|
||||
void testCalculateProjectBuilds() throws Exception {
|
||||
LifecycleTaskSegmentCalculator lifecycleTaskSegmentCalculator = getTaskSegmentCalculator();
|
||||
BuildListCalculator buildListCalculator = new BuildListCalculator();
|
||||
final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
|
||||
|
|
|
@ -48,9 +48,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class ConcurrencyDependencyGraphTest {
|
||||
class ConcurrencyDependencyGraphTest {
|
||||
@Test
|
||||
public void testConcurrencyGraphPrimaryVersion()
|
||||
void testConcurrencyGraphPrimaryVersion()
|
||||
throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
|
||||
NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException,
|
||||
PluginResolutionException, LifecyclePhaseNotFoundException, LifecycleNotFoundException {
|
||||
|
@ -80,7 +80,7 @@ public class ConcurrencyDependencyGraphTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testConcurrencyGraphDifferentCompletionOrder()
|
||||
void testConcurrencyGraphDifferentCompletionOrder()
|
||||
throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
|
||||
NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException,
|
||||
PluginResolutionException, LifecyclePhaseNotFoundException, LifecycleNotFoundException {
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class LifecycleDependencyResolverTest extends AbstractCoreMavenComponentTestCase {
|
||||
class LifecycleDependencyResolverTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private LifecycleDependencyResolver resolver;
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class LifecycleDependencyResolverTest extends AbstractCoreMavenComponentT
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCachedReactorProjectDependencies() throws Exception {
|
||||
void testCachedReactorProjectDependencies() throws Exception {
|
||||
MavenSession session = createMavenSession(
|
||||
new File("src/test/projects/lifecycle-dependency-resolver/pom.xml"), new Properties(), true);
|
||||
Collection<String> scopesToCollect = null;
|
||||
|
|
|
@ -34,10 +34,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class LifecycleExecutionPlanCalculatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
class LifecycleExecutionPlanCalculatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
|
||||
@Test
|
||||
public void testCalculateExecutionPlanWithGoalTasks() throws Exception {
|
||||
void testCalculateExecutionPlanWithGoalTasks() throws Exception {
|
||||
MojoDescriptorCreator mojoDescriptorCreator = createMojoDescriptorCreator();
|
||||
LifecycleExecutionPlanCalculator lifecycleExecutionPlanCalculator =
|
||||
createExecutionPlaceCalculator(mojoDescriptorCreator);
|
||||
|
|
|
@ -44,12 +44,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
@PlexusTest
|
||||
public class LifecycleModuleBuilderTest {
|
||||
class LifecycleModuleBuilderTest {
|
||||
@Inject
|
||||
PlexusContainer container;
|
||||
|
||||
@Test
|
||||
public void testCurrentProject() throws Exception {
|
||||
void testCurrentProject() throws Exception {
|
||||
List<MavenProject> currentProjects = new ArrayList<>();
|
||||
MojoExecutorStub mojoExecutor = new MojoExecutorStub() {
|
||||
@Override
|
||||
|
|
|
@ -31,9 +31,9 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class LifecycleTaskSegmentCalculatorImplTest {
|
||||
class LifecycleTaskSegmentCalculatorImplTest {
|
||||
@Test
|
||||
public void testCalculateProjectBuilds() throws Exception {
|
||||
void testCalculateProjectBuilds() throws Exception {
|
||||
LifecycleTaskSegmentCalculator lifecycleTaskSegmentCalculator = getTaskSegmentCalculator();
|
||||
BuildListCalculator buildListCalculator = new BuildListCalculator();
|
||||
final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
|
||||
|
|
|
@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class PhaseRecorderTest {
|
||||
class PhaseRecorderTest {
|
||||
@Test
|
||||
public void testObserveExecution() throws Exception {
|
||||
void testObserveExecution() throws Exception {
|
||||
PhaseRecorder phaseRecorder = new PhaseRecorder(ProjectDependencyGraphStub.A);
|
||||
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
|
||||
final List<MojoExecution> executions = plan.getMojoExecutions();
|
||||
|
|
|
@ -30,9 +30,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class ProjectBuildListTest {
|
||||
class ProjectBuildListTest {
|
||||
@Test
|
||||
public void testGetByTaskSegment() throws Exception {
|
||||
void testGetByTaskSegment() throws Exception {
|
||||
final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
|
||||
ProjectBuildList projectBuildList = ProjectDependencyGraphStub.getProjectBuildList(session);
|
||||
TaskSegment taskSegment = projectBuildList.get(0).getTaskSegment();
|
||||
|
|
|
@ -37,11 +37,11 @@ import static org.mockito.Mockito.verify;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class BuilderCommonTest {
|
||||
class BuilderCommonTest {
|
||||
private Logger logger = mock(Logger.class);
|
||||
|
||||
@Test
|
||||
public void testResolveBuildPlan() throws Exception {
|
||||
void testResolveBuildPlan() throws Exception {
|
||||
MavenSession original = ProjectDependencyGraphStub.getMavenSession();
|
||||
|
||||
final TaskSegment taskSegment1 = new TaskSegment(false);
|
||||
|
@ -56,7 +56,7 @@ public class BuilderCommonTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultBindingPluginsWarning() throws Exception {
|
||||
void testDefaultBindingPluginsWarning() throws Exception {
|
||||
MavenSession original = ProjectDependencyGraphStub.getMavenSession();
|
||||
|
||||
final TaskSegment taskSegment1 = new TaskSegment(false);
|
||||
|
@ -80,13 +80,13 @@ public class BuilderCommonTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHandleBuildError() throws Exception {}
|
||||
void testHandleBuildError() throws Exception {}
|
||||
|
||||
@Test
|
||||
public void testAttachToThread() throws Exception {}
|
||||
void testAttachToThread() throws Exception {}
|
||||
|
||||
@Test
|
||||
public void testGetKey() throws Exception {}
|
||||
void testGetKey() throws Exception {}
|
||||
|
||||
public BuilderCommon getBuilderCommon(Logger logger) {
|
||||
final LifecycleDebugLogger debugLogger = new LifecycleDebugLogger();
|
||||
|
|
|
@ -29,10 +29,10 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class ConcurrencyDependencyGraphTest {
|
||||
class ConcurrencyDependencyGraphTest {
|
||||
|
||||
@Test
|
||||
public void testGraph() throws Exception {
|
||||
void testGraph() throws Exception {
|
||||
|
||||
ProjectBuildList projectBuildList =
|
||||
ProjectDependencyGraphStub.getProjectBuildList(ProjectDependencyGraphStub.getMavenSession());
|
||||
|
|
|
@ -51,7 +51,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class ThreadOutputMuxerTest {
|
||||
class ThreadOutputMuxerTest {
|
||||
|
||||
final String paid = "Paid";
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class ThreadOutputMuxerTest {
|
|||
final String full = "Full";
|
||||
|
||||
@Test
|
||||
public void testSingleThreaded() throws Exception {
|
||||
void testSingleThreaded() throws Exception {
|
||||
ProjectBuildList src = getProjectBuildList();
|
||||
ProjectBuildList projectBuildList = new ProjectBuildList(Arrays.asList(src.get(0), src.get(1), src.get(2)));
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class ThreadOutputMuxerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMultiThreaded() throws Exception {
|
||||
void testMultiThreaded() throws Exception {
|
||||
ProjectBuildList projectBuildList = getProjectBuildList();
|
||||
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
|
|
|
@ -31,31 +31,31 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class ProjectDependencyGraphStubTest {
|
||||
class ProjectDependencyGraphStubTest {
|
||||
ProjectDependencyGraphStub stub = new ProjectDependencyGraphStub();
|
||||
|
||||
@Test
|
||||
public void testADependencies() {
|
||||
void testADependencies() {
|
||||
final List<MavenProject> mavenProjects = stub.getUpstreamProjects(ProjectDependencyGraphStub.A, false);
|
||||
assertEquals(0, mavenProjects.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBDependencies() {
|
||||
void testBDependencies() {
|
||||
final List<MavenProject> bProjects = stub.getUpstreamProjects(ProjectDependencyGraphStub.B, false);
|
||||
assertEquals(1, bProjects.size());
|
||||
assertTrue(bProjects.contains(ProjectDependencyGraphStub.A));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCDependencies() {
|
||||
void testCDependencies() {
|
||||
final List<MavenProject> cProjects = stub.getUpstreamProjects(ProjectDependencyGraphStub.C, false);
|
||||
assertEquals(1, cProjects.size());
|
||||
assertTrue(cProjects.contains(ProjectDependencyGraphStub.A));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testXDependencies() {
|
||||
void testXDependencies() {
|
||||
final List<MavenProject> cProjects = stub.getUpstreamProjects(ProjectDependencyGraphStub.X, false);
|
||||
assertEquals(2, cProjects.size());
|
||||
assertTrue(cProjects.contains(ProjectDependencyGraphStub.C));
|
||||
|
|
|
@ -30,9 +30,9 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
/**
|
||||
* @author atanasenko
|
||||
*/
|
||||
public class LifecyclePhaseTest {
|
||||
class LifecyclePhaseTest {
|
||||
@Test
|
||||
public void testToString() {
|
||||
void testToString() {
|
||||
LifecyclePhase phase = new LifecyclePhase();
|
||||
assertEquals("", phase.toString());
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class LifecyclePhaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSet() {
|
||||
void testSet() {
|
||||
LifecyclePhase phase = new LifecyclePhase();
|
||||
assertNull(phase.getMojos());
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
||||
class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private DefaultBuildPluginManager pluginManager;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginLoading() throws Exception {
|
||||
void testPluginLoading() throws Exception {
|
||||
MavenSession session = createMavenSession(null);
|
||||
Plugin plugin = new Plugin();
|
||||
plugin.setGroupId("org.apache.maven.its.plugins");
|
||||
|
@ -60,7 +60,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMojoDescriptorRetrieval() throws Exception {
|
||||
void testMojoDescriptorRetrieval() throws Exception {
|
||||
MavenSession session = createMavenSession(null);
|
||||
String goal = "it";
|
||||
Plugin plugin = new Plugin();
|
||||
|
@ -97,7 +97,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
// the plugin manager provides.
|
||||
|
||||
@Test
|
||||
public void testRemoteResourcesPlugin() throws Exception {
|
||||
void testRemoteResourcesPlugin() throws Exception {
|
||||
// TODO turn an equivalent back on when the RR plugin is released.
|
||||
|
||||
/*
|
||||
|
@ -147,7 +147,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMojoConfigurationIsMergedCorrectly() throws Exception {}
|
||||
void testMojoConfigurationIsMergedCorrectly() throws Exception {}
|
||||
|
||||
/**
|
||||
* The case where the user wants to specify an alternate version of the underlying tool. Common case
|
||||
|
@ -155,28 +155,28 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
* to use a specific version. We need to make sure the version that they specify takes precedence.
|
||||
*/
|
||||
@Test
|
||||
public void testMojoWhereInternallyStatedDependencyIsOverriddenByProject() throws Exception {}
|
||||
void testMojoWhereInternallyStatedDependencyIsOverriddenByProject() throws Exception {}
|
||||
|
||||
/**
|
||||
* The case where you have a plugin in the current build that you want to be used on projects in
|
||||
* the current build.
|
||||
*/
|
||||
@Test
|
||||
public void testMojoThatIsPresentInTheCurrentBuild() throws Exception {}
|
||||
void testMojoThatIsPresentInTheCurrentBuild() throws Exception {}
|
||||
|
||||
/**
|
||||
* This is the case where the Mojo wants to execute on every project and then do something at the end
|
||||
* with the results of each project.
|
||||
*/
|
||||
@Test
|
||||
public void testAggregatorMojo() throws Exception {}
|
||||
void testAggregatorMojo() throws Exception {}
|
||||
|
||||
/**
|
||||
* This is the case where a Mojo needs the lifecycle run to a certain phase before it can do
|
||||
* anything useful.
|
||||
*/
|
||||
@Test
|
||||
public void testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself() throws Exception {}
|
||||
void testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself() throws Exception {}
|
||||
|
||||
// test that mojo which does not require dependency resolution trigger no downloading of dependencies
|
||||
|
||||
|
@ -185,7 +185,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
// test a build where projects use different versions of the same plugin
|
||||
|
||||
@Test
|
||||
public void testThatPluginDependencyThatHasSystemScopeIsResolved() throws Exception {
|
||||
void testThatPluginDependencyThatHasSystemScopeIsResolved() throws Exception {
|
||||
MavenSession session = createMavenSession(getProject("project-contributing-system-scope-plugin-dep"));
|
||||
MavenProject project = session.getCurrentProject();
|
||||
Plugin plugin = project.getPlugin("org.apache.maven.its.plugins:maven-it-plugin");
|
||||
|
@ -225,7 +225,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginRealmCache() throws Exception {
|
||||
void testPluginRealmCache() throws Exception {
|
||||
RepositoryRequest repositoryRequest = new DefaultRepositoryRequest();
|
||||
repositoryRequest.setLocalRepository(getLocalRepository());
|
||||
repositoryRequest.setRemoteRepositories(getPluginArtifactRepositories());
|
||||
|
@ -264,7 +264,7 @@ public class PluginManagerTest extends AbstractCoreMavenComponentTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBuildExtensionsPluginLoading() throws Exception {
|
||||
void testBuildExtensionsPluginLoading() throws Exception {
|
||||
RepositoryRequest repositoryRequest = new DefaultRepositoryRequest();
|
||||
repositoryRequest.setLocalRepository(getLocalRepository());
|
||||
repositoryRequest.setRemoteRepositories(getPluginArtifactRepositories());
|
||||
|
|
|
@ -33,12 +33,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
* @author Robert Scholte
|
||||
*
|
||||
*/
|
||||
public class PluginParameterExceptionTest {
|
||||
class PluginParameterExceptionTest {
|
||||
|
||||
private final String LS = System.lineSeparator();
|
||||
|
||||
@Test
|
||||
public void testMissingRequiredStringArrayTypeParameter() {
|
||||
void testMissingRequiredStringArrayTypeParameter() {
|
||||
MojoDescriptor mojoDescriptor = new MojoDescriptor();
|
||||
mojoDescriptor.setGoal("goal");
|
||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||
|
@ -70,7 +70,7 @@ public class PluginParameterExceptionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingRequiredCollectionTypeParameter() {
|
||||
void testMissingRequiredCollectionTypeParameter() {
|
||||
MojoDescriptor mojoDescriptor = new MojoDescriptor();
|
||||
mojoDescriptor.setGoal("goal");
|
||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||
|
@ -102,7 +102,7 @@ public class PluginParameterExceptionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingRequiredMapTypeParameter() {
|
||||
void testMissingRequiredMapTypeParameter() {
|
||||
MojoDescriptor mojoDescriptor = new MojoDescriptor();
|
||||
mojoDescriptor.setGoal("goal");
|
||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||
|
@ -134,7 +134,7 @@ public class PluginParameterExceptionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingRequiredPropertiesTypeParameter() {
|
||||
void testMissingRequiredPropertiesTypeParameter() {
|
||||
MojoDescriptor mojoDescriptor = new MojoDescriptor();
|
||||
mojoDescriptor.setGoal("goal");
|
||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||
|
|
|
@ -58,14 +58,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
private static final String FS = File.separator;
|
||||
|
||||
@Inject
|
||||
private RepositorySystem factory;
|
||||
|
||||
@Test
|
||||
public void testPluginDescriptorExpressionReference() throws Exception {
|
||||
void testPluginDescriptorExpressionReference() throws Exception {
|
||||
MojoExecution exec = newMojoExecution();
|
||||
|
||||
MavenSession session = newMavenSession();
|
||||
|
@ -81,7 +81,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginArtifactsExpressionReference() throws Exception {
|
||||
void testPluginArtifactsExpressionReference() throws Exception {
|
||||
MojoExecution exec = newMojoExecution();
|
||||
|
||||
Artifact depArtifact = createArtifact("group", "artifact", "1");
|
||||
|
@ -105,7 +105,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginArtifactMapExpressionReference() throws Exception {
|
||||
void testPluginArtifactMapExpressionReference() throws Exception {
|
||||
MojoExecution exec = newMojoExecution();
|
||||
|
||||
Artifact depArtifact = createArtifact("group", "artifact", "1");
|
||||
|
@ -132,7 +132,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPluginArtifactIdExpressionReference() throws Exception {
|
||||
void testPluginArtifactIdExpressionReference() throws Exception {
|
||||
MojoExecution exec = newMojoExecution();
|
||||
|
||||
MavenSession session = newMavenSession();
|
||||
|
@ -148,7 +148,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testValueExtractionWithAPomValueContainingAPath() throws Exception {
|
||||
void testValueExtractionWithAPomValueContainingAPath() throws Exception {
|
||||
String expected = getTestFile("target/test-classes/target/classes").getCanonicalPath();
|
||||
|
||||
Build build = new Build();
|
||||
|
@ -169,7 +169,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEscapedVariablePassthrough() throws Exception {
|
||||
void testEscapedVariablePassthrough() throws Exception {
|
||||
String var = "${var}";
|
||||
|
||||
Model model = new Model();
|
||||
|
@ -185,7 +185,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEscapedVariablePassthroughInLargerExpression() throws Exception {
|
||||
void testEscapedVariablePassthroughInLargerExpression() throws Exception {
|
||||
String var = "${var}";
|
||||
String key = var + " with version: ${project.version}";
|
||||
|
||||
|
@ -202,7 +202,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleSubExpressionsInLargerExpression() throws Exception {
|
||||
void testMultipleSubExpressionsInLargerExpression() throws Exception {
|
||||
String key = "${project.artifactId} with version: ${project.version}";
|
||||
|
||||
Model model = new Model();
|
||||
|
@ -219,7 +219,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMissingPOMPropertyRefInLargerExpression() throws Exception {
|
||||
void testMissingPOMPropertyRefInLargerExpression() throws Exception {
|
||||
String expr = "/path/to/someproject-${baseVersion}";
|
||||
|
||||
MavenProject project = new MavenProject(new Model());
|
||||
|
@ -232,7 +232,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPOMPropertyExtractionWithMissingProject_WithDotNotation() throws Exception {
|
||||
void testPOMPropertyExtractionWithMissingProject_WithDotNotation() throws Exception {
|
||||
String key = "m2.name";
|
||||
String checkValue = "value";
|
||||
|
||||
|
@ -252,7 +252,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasedirExtractionWithMissingProject() throws Exception {
|
||||
void testBasedirExtractionWithMissingProject() throws Exception {
|
||||
ExpressionEvaluator ee = createExpressionEvaluator(null, null, new Properties());
|
||||
|
||||
Object value = ee.evaluate("${basedir}");
|
||||
|
@ -261,7 +261,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testValueExtractionFromSystemPropertiesWithMissingProject() throws Exception {
|
||||
void testValueExtractionFromSystemPropertiesWithMissingProject() throws Exception {
|
||||
String sysprop = "PPEET_sysprop1";
|
||||
|
||||
Properties executionProperties = new Properties();
|
||||
|
@ -278,7 +278,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testValueExtractionFromSystemPropertiesWithMissingProject_WithDotNotation() throws Exception {
|
||||
void testValueExtractionFromSystemPropertiesWithMissingProject_WithDotNotation() throws Exception {
|
||||
String sysprop = "PPEET.sysprop2";
|
||||
|
||||
Properties executionProperties = new Properties();
|
||||
|
@ -308,7 +308,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLocalRepositoryExtraction() throws Exception {
|
||||
void testLocalRepositoryExtraction() throws Exception {
|
||||
ExpressionEvaluator expressionEvaluator =
|
||||
createExpressionEvaluator(createDefaultProject(), null, new Properties());
|
||||
Object value = expressionEvaluator.evaluate("${localRepository}");
|
||||
|
@ -317,7 +317,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTwoExpressions() throws Exception {
|
||||
void testTwoExpressions() throws Exception {
|
||||
Build build = new Build();
|
||||
build.setDirectory("expected-directory");
|
||||
build.setFinalName("expected-finalName");
|
||||
|
@ -334,7 +334,7 @@ public class PluginParameterExpressionEvaluatorTest extends AbstractCoreMavenCom
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testShouldExtractPluginArtifacts() throws Exception {
|
||||
void testShouldExtractPluginArtifacts() throws Exception {
|
||||
PluginDescriptor pd = new PluginDescriptor();
|
||||
|
||||
Artifact artifact = createArtifact("testGroup", "testArtifact", "1.0");
|
||||
|
|
|
@ -30,12 +30,12 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
/**
|
||||
* @author Kristian Rosenvold
|
||||
*/
|
||||
public class DefaultLegacySupportTest {
|
||||
class DefaultLegacySupportTest {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final DefaultLegacySupport defaultLegacySupport = new DefaultLegacySupport();
|
||||
|
||||
@Test
|
||||
public void testSetSession() throws Exception {
|
||||
void testSetSession() throws Exception {
|
||||
|
||||
MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest();
|
||||
MavenSession m1 = new MavenSession(null, null, mavenExecutionRequest, null);
|
||||
|
|
|
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* @author Michael Simacek
|
||||
*/
|
||||
public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase {
|
||||
@Inject
|
||||
private MavenPluginValidator mavenPluginValidator;
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testValidate() {
|
||||
void testValidate() {
|
||||
Artifact plugin = new DefaultArtifact(
|
||||
"org.apache.maven.its.plugins",
|
||||
"maven-it-plugin",
|
||||
|
@ -64,7 +64,7 @@ public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidGroupId() {
|
||||
void testInvalidGroupId() {
|
||||
Artifact plugin = new DefaultArtifact(
|
||||
"org.apache.maven.its.plugins",
|
||||
"maven-it-plugin",
|
||||
|
@ -83,7 +83,7 @@ public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidArtifactId() {
|
||||
void testInvalidArtifactId() {
|
||||
Artifact plugin = new DefaultArtifact(
|
||||
"org.apache.maven.its.plugins",
|
||||
"maven-it-plugin",
|
||||
|
@ -102,7 +102,7 @@ public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidVersion() {
|
||||
void testInvalidVersion() {
|
||||
Artifact plugin = new DefaultArtifact(
|
||||
"org.apache.maven.its.plugins",
|
||||
"maven-it-plugin",
|
||||
|
|
|
@ -45,7 +45,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase {
|
||||
class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase {
|
||||
@TempDir
|
||||
File localRepoDir;
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildFromMiddlePom() throws Exception {
|
||||
void testBuildFromMiddlePom() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/grandchild-check/child/pom.xml");
|
||||
File f2 = getTestFile("src/test/resources/projects/grandchild-check/child/grandchild/pom.xml");
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
|
||||
@Disabled("Maven 4 does not allow duplicate plugin declarations")
|
||||
@Test
|
||||
public void testDuplicatePluginDefinitionsMerged() throws Exception {
|
||||
void testDuplicatePluginDefinitionsMerged() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/duplicate-plugins-merged-pom.xml");
|
||||
|
||||
MavenProject project = getProject(f1);
|
||||
|
@ -97,7 +97,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFutureModelVersion() throws Exception {
|
||||
void testFutureModelVersion() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/future-model-version-pom.xml");
|
||||
|
||||
ProjectBuildingException e = assertThrows(
|
||||
|
@ -106,7 +106,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPastModelVersion() throws Exception {
|
||||
void testPastModelVersion() throws Exception {
|
||||
// a Maven 1.x pom will not even
|
||||
// update the resource if we stop supporting modelVersion 4.0.0
|
||||
File f1 = getTestFile("src/test/resources/projects/past-model-version-pom.xml");
|
||||
|
@ -117,7 +117,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFutureSchemaModelVersion() throws Exception {
|
||||
void testFutureSchemaModelVersion() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/future-schema-model-version-pom.xml");
|
||||
|
||||
ProjectBuildingException e = assertThrows(
|
||||
|
@ -126,7 +126,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBuildStubModelForMissingRemotePom() throws Exception {
|
||||
void testBuildStubModelForMissingRemotePom() throws Exception {
|
||||
Artifact pom = repositorySystem.createProjectArtifact("org.apache.maven.its", "missing", "0.1");
|
||||
MavenProject project = getProject(pom, true);
|
||||
|
||||
|
@ -150,7 +150,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPartialResultUponBadDependencyDeclaration() throws Exception {
|
||||
void testPartialResultUponBadDependencyDeclaration() throws Exception {
|
||||
File pomFile = getTestFile("src/test/resources/projects/bad-dependency.xml");
|
||||
|
||||
ProjectBuildingRequest request = newBuildingRequest();
|
||||
|
@ -177,7 +177,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildValidParentVersionRangeLocally() throws Exception {
|
||||
void testBuildValidParentVersionRangeLocally() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/parent-version-range-local-valid/child/pom.xml");
|
||||
|
||||
final MavenProject childProject = getProject(f1);
|
||||
|
@ -196,7 +196,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception {
|
||||
void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception {
|
||||
File f1 = getTestFile(
|
||||
"src/test/resources/projects/parent-version-range-local-child-without-version/child/pom.xml");
|
||||
|
||||
|
@ -213,7 +213,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildParentVersionRangeLocallyWithChildProjectVersionExpression() throws Exception {
|
||||
void testBuildParentVersionRangeLocallyWithChildProjectVersionExpression() throws Exception {
|
||||
File f1 = getTestFile(
|
||||
"src/test/resources/projects/parent-version-range-local-child-project-version-expression/child/pom.xml");
|
||||
|
||||
|
@ -262,7 +262,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildParentVersionRangeExternally() throws Exception {
|
||||
void testBuildParentVersionRangeExternally() throws Exception {
|
||||
File f1 = getTestFile("src/test/resources/projects/parent-version-range-external-valid/pom.xml");
|
||||
|
||||
final MavenProject childProject = this.getProjectFromRemoteRepository(f1);
|
||||
|
@ -281,7 +281,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception {
|
||||
void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception {
|
||||
File f1 =
|
||||
getTestFile("src/test/resources/projects/parent-version-range-external-child-without-version/pom.xml");
|
||||
|
||||
|
@ -298,7 +298,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void testBuildParentVersionRangeExternallyWithChildProjectVersionExpression() throws Exception {
|
||||
void testBuildParentVersionRangeExternallyWithChildProjectVersionExpression() throws Exception {
|
||||
File f1 = getTestFile(
|
||||
"src/test/resources/projects/parent-version-range-external-child-project-version-expression/pom.xml");
|
||||
|
||||
|
@ -315,7 +315,7 @@ public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase
|
|||
* @throws Exception in case of issue
|
||||
*/
|
||||
@Test
|
||||
public void rereadPom_mng7063() throws Exception {
|
||||
void rereadPom_mng7063() throws Exception {
|
||||
final Path pom = projectRoot.resolve("pom.xml");
|
||||
final ProjectBuildingRequest buildingRequest = newBuildingRequest();
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue