[MNG-7451] - Remove public modifier from test methods / test classes

This commit is contained in:
Karl Heinz Marbaise 2023-04-15 19:23:43 +02:00
parent d7d8544669
commit c49c4e0b18
No known key found for this signature in database
GPG Key ID: BF1518E0160788A2
200 changed files with 1205 additions and 1209 deletions

View File

@ -34,10 +34,10 @@
*
* @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");

View File

@ -23,7 +23,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
public class SettingsTest {
class SettingsTest {
@Test
void testSetLocalRepository() {

View File

@ -35,14 +35,14 @@
*
* @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 void testIsSnapshot() {
}
@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 void testToSnapshotVersion() {
* 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"));

View File

@ -27,7 +27,7 @@
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 void setUp() throws Exception {
}
@Test
public void testGetVersionReturnsResolvedVersionOnSnapshot() {
void testGetVersionReturnsResolvedVersionOnSnapshot() {
assertEquals(snapshotResolvedVersion, snapshotArtifact.getVersion());
// this is FOUL!
@ -70,55 +70,55 @@ public void testGetVersionReturnsResolvedVersionOnSnapshot() {
}
@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 void testComparisonByVersion() {
}
@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());

View File

@ -32,10 +32,10 @@
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");

View File

@ -31,7 +31,7 @@
* @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 @@ private void checkVersionsOrder(String v1, String v2) {
}
@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 void testVersionsEqual() {
}
@Test
public void testVersionComparing() {
void testVersionComparing() {
checkVersionsOrder("1", "2");
checkVersionsOrder("1.5", "2");
checkVersionsOrder("1", "2.5");
@ -209,13 +209,13 @@ public void testVersionComparing() {
}
@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 void testGetCanonical() {
* <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 void testMng5568() {
* 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 void testMng6572() {
* (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 void testVersionEqualWithLeadingZeroes() {
* (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 void testVersionZeroEqualWithLeadingZeroes() {
* for qualifiers that start with "-0.", which was showing A == C and B == C but A &lt; 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 void testMng6964() {
}
@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 void testLocaleIndependent() {
}
@Test
public void testReuse() {
void testReuse() {
ComparableVersion c1 = new ComparableVersion("1");
c1.parseVersion("2");
@ -373,7 +373,7 @@ public void testReuse() {
* 1.0.0.X1 &lt; 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");

View File

@ -29,7 +29,7 @@
*
* @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 @@ private void checkVersionParsing(
}
@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 void testVersionParsing() {
}
@Test
public void testVersionComparing() {
void testVersionComparing() {
assertVersionEqual("1", "1");
assertVersionOlder("1", "2");
assertVersionOlder("1.5", "2");
@ -133,7 +133,7 @@ public void testVersionComparing() {
}
@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 void testVersionSnapshotComparing() {
}
@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 void testHashCode() {
}
@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"));
}

View File

@ -35,7 +35,7 @@
*
* @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 void testRange() throws InvalidVersionSpecificationException, OverConstra
}
@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 void testInvalidRanges() {
}
@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 void testIntersections() throws InvalidVersionSpecificationException {
}
@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 void testReleaseRangeBoundsContainsSnapshots() throws InvalidVersionSpeci
}
@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 void testSnapshotRangeBoundsCanContainSnapshots() throws InvalidVersionSp
}
@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 @@ private void checkInvalidRange(String version) {
}
@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 boolean enforceVersion(String requiredVersionRange, ArtifactVersion actua
}
@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

View File

@ -25,10 +25,10 @@
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 void testGetProblems() {
}
@Test
public void testSetSource() {
void testSetSource() {
DefaultProblemCollector collector = new DefaultProblemCollector(null);
collector.add(null, "PROBLEM1", -1, -1, null);

View File

@ -25,10 +25,10 @@
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 void testGetSeverity() {
}
@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 void testGetLineNumber() {
}
@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 void testGetColumnNumber() {
}
@Test
public void testGetException() {
void testGetException() {
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
assertNull(problem.getException());
@ -85,7 +85,7 @@ public void testGetException() {
}
@Test
public void testGetSource() {
void testGetSource() {
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
assertEquals("", problem.getSource());
@ -97,7 +97,7 @@ public void testGetSource() {
}
@Test
public void testGetLocation() {
void testGetLocation() {
DefaultProblem problem = new DefaultProblem(null, null, null, -1, -1, null);
assertEquals("", problem.getLocation());
@ -115,7 +115,7 @@ public void testGetLocation() {
}
@Test
public void testGetMessage() {
void testGetMessage() {
DefaultProblem problem = new DefaultProblem("MESSAGE", null, null, -1, -1, null);
assertEquals("MESSAGE", problem.getMessage());

View File

@ -27,17 +27,17 @@
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 void testGetInputStream() throws Exception {
}
@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());

View File

@ -25,10 +25,10 @@
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);

View File

@ -25,9 +25,9 @@
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 void testGetInputStream() throws Exception {
}
@Test
public void testGetLocation() {
void testGetLocation() {
StringSource source = new StringSource("Hello World!");
assertEquals("(memory)", source.getLocation());
@ -46,7 +46,7 @@ public void testGetLocation() {
}
@Test
public void testGetContent() {
void testGetContent() {
StringSource source = new StringSource(null);
assertEquals("", source.getContent());

View File

@ -28,17 +28,17 @@
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 void testGetInputStream() throws Exception {
}
@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());

View File

@ -39,7 +39,7 @@
/**
* @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 @@ protected String component() {
}
@Test
public void testArtifactInstallation() throws Exception {
void testArtifactInstallation() throws Exception {
sessionScope.enter();
try {
sessionScope.seed(MavenSession.class, mock(MavenSession.class));

View File

@ -28,13 +28,13 @@
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(

View File

@ -34,7 +34,7 @@
/**
* @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 @@ protected String component() {
}
@Test
public void testArtifactInstallation() throws Exception {
void testArtifactInstallation() throws Exception {
sessionScope.enter();
try {
sessionScope.seed(MavenSession.class, mock(MavenSession.class));

View File

@ -23,7 +23,7 @@
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 String getId() {
}
@Test
public void testHashCodeEquals() {
void testHashCodeEquals() {
MavenArtifactRepositorySubclass r1 = new MavenArtifactRepositorySubclass("foo");
MavenArtifactRepositorySubclass r2 = new MavenArtifactRepositorySubclass("foo");
MavenArtifactRepositorySubclass r3 = new MavenArtifactRepositorySubclass("bar");

View File

@ -30,11 +30,11 @@
*
* @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";

View File

@ -52,7 +52,7 @@
/**
* @author Jason van Zyl
*/
public class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
class ArtifactResolverTest extends AbstractArtifactComponentTestCase {
@Inject
private ArtifactResolver artifactResolver;
@ -79,7 +79,7 @@ protected String component() {
}
@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 void testResolutionOfASingleArtifactWhereTheArtifactIsPresentInTheLocalRe
}
@Test
public void
testResolutionOfASingleArtifactWhereTheArtifactIsNotPresentLocallyAndMustBeRetrievedFromTheRemoteRepository()
void testResolutionOfASingleArtifactWhereTheArtifactIsNotPresentLocallyAndMustBeRetrievedFromTheRemoteRepository()
throws Exception {
Artifact b = createRemoteArtifact("b", "1.0-SNAPSHOT");
deleteLocalArtifact(b);
@ -104,7 +103,7 @@ protected Artifact createArtifact(String groupId, String artifactId, String vers
}
@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 void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalReposit
}
@Test
public void
void
testTransitiveResolutionWhereAllArtifactsAreNotPresentInTheLocalRepositoryAndMustBeRetrievedFromTheRemoteRepository()
throws Exception {
Artifact i = createRemoteArtifact("i", "1.0-SNAPSHOT");
@ -152,7 +151,7 @@ public void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalReposit
}
@Test
public void testResolutionFailureWhenArtifactNotPresentInRemoteRepository() throws Exception {
void testResolutionFailureWhenArtifactNotPresentInRemoteRepository() throws Exception {
Artifact k = createArtifact("k", "1.0");
assertThrows(
@ -162,7 +161,7 @@ public void testResolutionFailureWhenArtifactNotPresentInRemoteRepository() thro
}
@Test
public void testResolutionOfAnArtifactWhereOneRemoteRepositoryIsBadButOneIsGood() throws Exception {
void testResolutionOfAnArtifactWhereOneRemoteRepositoryIsBadButOneIsGood() throws Exception {
Artifact l = createRemoteArtifact("l", "1.0-SNAPSHOT");
deleteLocalArtifact(l);
@ -187,7 +186,7 @@ public void testReadRepoFromModel() throws Exception {
}
@Test
public void testTransitiveResolutionOrder() throws Exception {
void testTransitiveResolutionOrder() throws Exception {
Artifact m = createLocalArtifact("m", "1.0");
Artifact n = createLocalArtifact("n", "1.0");

View File

@ -30,7 +30,7 @@
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 @@ protected String component() {
}
@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 void testMNG4738() throws Exception {
}
@Test
public void testLookup() throws Exception {
void testLookup() throws Exception {
ArtifactResolver resolver = getContainer().lookup(ArtifactResolver.class, "default");
}
}

View File

@ -31,14 +31,14 @@
*
* @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()));

View File

@ -28,10 +28,10 @@
/**
* @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);

View File

@ -31,14 +31,14 @@
*
* @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()));

View File

@ -30,14 +30,14 @@
*
* @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 void testInclude_Compile() {
}
@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 void testInclude_CompilePlusRuntime() {
}
@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 void testInclude_Runtime() {
}
@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 void testInclude_RuntimePlusSystem() {
}
@Test
public void testInclude_Test() {
void testInclude_Test() {
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_TEST);
assertTrue(filter.include(newArtifact(Artifact.SCOPE_COMPILE)));

View File

@ -35,12 +35,12 @@
/** @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());

View File

@ -37,7 +37,7 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
@PlexusTest
public class DefaultProfileManagerTest {
class DefaultProfileManagerTest {
@Inject
PlexusContainer container;
@ -47,7 +47,7 @@ protected PlexusContainer getContainer() {
}
@Test
public void testShouldActivateDefaultProfile() throws Exception {
void testShouldActivateDefaultProfile() throws Exception {
Profile notActivated = new Profile();
notActivated.setId("notActivated");
@ -81,7 +81,7 @@ public void testShouldActivateDefaultProfile() throws Exception {
}
@Test
public void testShouldNotActivateDefaultProfile() throws Exception {
void testShouldNotActivateDefaultProfile() throws Exception {
Profile syspropActivated = new Profile();
syspropActivated.setId("syspropActivated");
@ -118,7 +118,7 @@ public void testShouldNotActivateDefaultProfile() throws Exception {
}
@Test
public void testShouldNotActivateReversalOfPresentSystemProperty() throws Exception {
void testShouldNotActivateReversalOfPresentSystemProperty() throws Exception {
Profile syspropActivated = new Profile();
syspropActivated.setId("syspropActivated");
@ -144,7 +144,7 @@ public void testShouldNotActivateReversalOfPresentSystemProperty() throws Except
}
@Test
public void testShouldOverrideAndActivateInactiveProfile() throws Exception {
void testShouldOverrideAndActivateInactiveProfile() throws Exception {
Profile syspropActivated = new Profile();
syspropActivated.setId("syspropActivated");
@ -173,7 +173,7 @@ public void testShouldOverrideAndActivateInactiveProfile() throws Exception {
}
@Test
public void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
Profile syspropActivated = new Profile();
syspropActivated.setId("syspropActivated");
@ -202,7 +202,7 @@ public void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
@Test
@Disabled
public void testOsActivationProfile() throws Exception {
void testOsActivationProfile() throws Exception {
/*
Profile osActivated = new Profile();
osActivated.setId( "os-profile" );

View File

@ -32,7 +32,7 @@
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 void setUp() throws Exception {
}
@Test
public void testProjectClasspath() throws Exception {
void testProjectClasspath() throws Exception {
File f = getFileForClasspathResource(dir + "project-with-scoped-dependencies.xml");
MavenProject project = getProjectWithDependencies(f);

View File

@ -35,7 +35,7 @@
*
* @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());

View File

@ -31,7 +31,7 @@
*
* @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
// ----------------------------------------------------------------------

View File

@ -45,7 +45,7 @@
*
* @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());

View File

@ -37,7 +37,7 @@
*
* @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");

View File

@ -37,7 +37,7 @@
*
* @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();

View File

@ -35,7 +35,7 @@
*
* @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");

View File

@ -36,7 +36,7 @@
*
* @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");

View File

@ -36,7 +36,7 @@
*
* @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");

View File

@ -36,7 +36,7 @@
*
* @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");

View File

@ -36,7 +36,7 @@
*
* @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 &amp; 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 void testDependencyManagementExclusionsExcludeTransitively() throws Excep
* @throws Exception
*/
@Test
public void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives() throws Exception {
void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives() throws Exception {
File localRepo = getLocalRepositoryPath();
File pom0 = new File(localRepo, "p0/pom.xml");

View File

@ -42,7 +42,7 @@
*
* @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");

View File

@ -33,7 +33,7 @@
* @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");

View File

@ -33,7 +33,7 @@
* 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");

View File

@ -31,7 +31,7 @@
*
* @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 void testScmInfoCalculatedCorrectlyOnParentAndChildRead() throws Exceptio
}
@Test
public void testScmInfoCalculatedCorrectlyOnChildOnlyRead() throws Exception {
void testScmInfoCalculatedCorrectlyOnChildOnlyRead() throws Exception {
File localRepo = getLocalRepositoryPath();
File pom1 = new File(localRepo, "p0/modules/p1/pom.xml");

View File

@ -25,10 +25,10 @@
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 void testAlignToBasedirWhereBasedirExpressionIsTheCompleteValue() {
}
@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 void testAlignToBasedirWhereBasedirExpressionIsTheValuePrefix() {
}
@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);

View File

@ -24,9 +24,9 @@
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));

View File

@ -55,7 +55,7 @@
* @author Benjamin Bentmann
*/
@PlexusTest
public class LegacyRepositorySystemTest {
class LegacyRepositorySystemTest {
@Inject
private RepositorySystem repositorySystem;
@ -89,7 +89,7 @@ protected ArtifactRepository getLocalRepository() throws Exception {
}
@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 void testThatASystemScopedDependencyIsNotResolvedFromRepositories() throw
}
@Test
public void testLocalRepositoryBasedir() throws Exception {
void testLocalRepositoryBasedir() throws Exception {
File localRepoDir = new File("").getAbsoluteFile();
ArtifactRepository localRepo = repositorySystem.createLocalRepository(localRepoDir);

View File

@ -36,7 +36,7 @@
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 void testExternalURL() {
}
@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 void testMirrorLookup() {
}
@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 void testMirrorWildcardLookup() {
}
@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 void testMirrorStopOnFirstMatch() {
}
@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 void testPatterns() {
}
@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 void testPatternsWithExternal() {
}
@Test
public void testLayoutPattern() {
void testLayoutPattern() {
assertTrue(DefaultMirrorSelector.matchesLayout("default", null));
assertTrue(DefaultMirrorSelector.matchesLayout("default", ""));
assertTrue(DefaultMirrorSelector.matchesLayout("default", "*"));
@ -192,7 +192,7 @@ public void testLayoutPattern() {
}
@Test
public void testMirrorLayoutConsideredForMatching() {
void testMirrorLayoutConsideredForMatching() {
ArtifactRepository repo = getRepo("a");
Mirror mirrorA = newMirror("a", "a", null, "http://a");

View File

@ -39,7 +39,7 @@
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 void setUp() throws Exception {
}
@Test
public void testArtifact() throws Exception {
void testArtifact() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -88,7 +88,7 @@ public void testArtifact() throws Exception {
}
@Test
public void testMissingArtifact() throws Exception {
void testMissingArtifact() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -113,7 +113,7 @@ public void testMissingArtifact() throws Exception {
}
@Test
public void testPom() throws Exception {
void testPom() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -141,7 +141,7 @@ public void testPom() throws Exception {
}
@Test
public void testMissingPom() throws Exception {
void testMissingPom() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -166,7 +166,7 @@ public void testMissingPom() throws Exception {
}
@Test
public void testMetadata() throws Exception {
void testMetadata() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -194,7 +194,7 @@ public void testMetadata() throws Exception {
}
@Test
public void testMissingMetadata() throws Exception {
void testMissingMetadata() throws Exception {
ArtifactRepository remoteRepository = remoteRepository();
ArtifactRepository localRepository = localRepository();
@ -220,7 +220,7 @@ public void testMissingMetadata() throws Exception {
}
@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);

View File

@ -60,7 +60,7 @@
* @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 void transferInitiated(TransferEvent transferEvent) {
}
@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 void testGetMissingJar() throws TransferFailedException, UnsupportedProto
}
@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 void testGetMissingJarForced() throws TransferFailedException, Unsupporte
}
@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 @@ private ArtifactRepository getRepo(String id) {
}
@Test
public void testDefaultWagonManager() throws Exception {
void testDefaultWagonManager() throws Exception {
assertWagon("a");
assertWagon("b");
@ -214,7 +214,7 @@ public void testDefaultWagonManager() throws Exception {
* 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 void testWagonTransferListenerRemovedAfterGetArtifactAndPutArtifact() thr
*/
@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 void testChecksumVerification() throws Exception {
}
@Test
public void testPerLookupInstantiation() throws Exception {
void testPerLookupInstantiation() throws Exception {
String protocol = "perlookup";
Wagon one = wagonManager.getWagon(protocol);

View File

@ -39,19 +39,19 @@
* @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");

View File

@ -64,7 +64,7 @@
* @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 void setUp() throws Exception {
@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 void testCircularDependencyNotIncludingCurrentProject()
@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 void testCircularDependencyIncludingCurrentProject()
}
@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 void testResolveWithFilter() throws ArtifactResolutionException, InvalidV
}
@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 void testResolveCorrectDependenciesWhenDifferentDependenciesOnNearest()
@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 void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewest()
@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 void testResolveCorrectDependenciesWhenDifferentDependenciesOnNewestVersi
}
@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 void testResolveNearestNewestIsNearest()
}
@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 void testResolveNearestOldestIsNearest()
}
@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 void testResolveLocalNewestIsLocal()
}
@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 void testResolveLocalOldestIsLocal()
}
@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 void testResolveLocalWithNewerVersionButLesserScope()
}
@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 void testResolveLocalWithNewerVersionButLesserScopeResolvedFirst()
}
@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 void testResolveNearestWithRanges()
}
@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 void testResolveRangeWithManagedVersion()
}
@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 void testCompatibleRanges() throws ArtifactResolutionException, InvalidVe
}
@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 void testIncompatibleRanges() throws ArtifactResolutionException, Invalid
}
@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 void testUnboundedRangeWhenVersionUnavailable()
}
@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 void testUnboundedRangeBelowLastRelease()
}
@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 void testUnboundedRangeAboveLastRelease()
}
@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 void testResolveManagedVersion() throws ArtifactResolutionException, Inva
}
@Test
public void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManagementHasDifferentVersion()
void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManagementHasDifferentVersion()
throws ArtifactResolutionException, InvalidVersionSpecificationException {
ArtifactSpec a = createArtifactSpec("a", "1.0");
@ -411,7 +403,7 @@ public void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManageme
}
@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 void testResolveCompileScopeOverTestScope()
}
@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 void testResolveRuntimeScopeOverTestScope()
}
@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 void testResolveCompileScopeOverRuntimeScope()
}
@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 void testResolveCompileScopeOverProvidedScope()
}
@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 void testResolveRuntimeScopeOverProvidedScope()
}
@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 void testProvidedScopeNotTransitive()
}
@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 void testOptionalNotTransitive() throws ArtifactResolutionException, Inva
}
@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 void testOptionalIncludedAtRoot() throws ArtifactResolutionException, Inv
}
@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 @@ private void checkScopeUpdate(ArtifactSpec a, ArtifactSpec b, String expectedSco
@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 void testOptionalNotTransitiveButVersionIsInfluential()
}
@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 void testTestScopeNotTransitive() throws ArtifactResolutionException, Inv
}
@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 void testSnapshotNotIncluded() throws ArtifactResolutionException, Invali
@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)");

View File

@ -27,7 +27,7 @@
* @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 FarthestConflictResolverTest() throws Exception {
* </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 void testDepth() {
* </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 void testDepthReversed() {
* </pre>
*/
@Test
public void testEqual() {
void testEqual() {
ResolutionNode a1n = createResolutionNode(a1);
ResolutionNode a2n = createResolutionNode(a2);
@ -91,7 +91,7 @@ public void testEqual() {
* </pre>
*/
@Test
public void testEqualReversed() {
void testEqualReversed() {
ResolutionNode a2n = createResolutionNode(a2);
ResolutionNode a1n = createResolutionNode(a1);

View File

@ -27,7 +27,7 @@
* @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 NearestConflictResolverTest() throws Exception {
* </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 void testDepth() {
* </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 void testDepthReversed() {
* </pre>
*/
@Test
public void testEqual() {
void testEqual() {
ResolutionNode a1n = createResolutionNode(a1);
ResolutionNode a2n = createResolutionNode(a2);
@ -91,7 +91,7 @@ public void testEqual() {
* </pre>
*/
@Test
public void testEqualReversed() {
void testEqualReversed() {
ResolutionNode a2n = createResolutionNode(a2);
ResolutionNode a1n = createResolutionNode(a1);

View File

@ -27,7 +27,7 @@
* @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 NewestConflictResolverTest() throws Exception {
* </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 void testDepth() {
* </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 void testDepthReversed() {
* </pre>
*/
@Test
public void testEqual() {
void testEqual() {
ResolutionNode a1n = createResolutionNode(a1);
ResolutionNode a2n = createResolutionNode(a2);
@ -91,7 +91,7 @@ public void testEqual() {
* </pre>
*/
@Test
public void testEqualReversed() {
void testEqualReversed() {
ResolutionNode a2n = createResolutionNode(a2);
ResolutionNode a1n = createResolutionNode(a1);

View File

@ -27,7 +27,7 @@
* @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 OldestConflictResolverTest() throws Exception {
* </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 void testDepth() {
* </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 void testDepthReversed() {
* </pre>
*/
@Test
public void testEqual() {
void testEqual() {
ResolutionNode a1n = createResolutionNode(a1);
ResolutionNode a2n = createResolutionNode(a2);
@ -91,7 +91,7 @@ public void testEqual() {
* </pre>
*/
@Test
public void testEqualReversed() {
void testEqualReversed() {
ResolutionNode a2n = createResolutionNode(a2);
ResolutionNode a1n = createResolutionNode(a1);

View File

@ -34,7 +34,7 @@
*
*/
@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 void setUp() throws Exception {
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 void testCompileClasspathTransform() throws Exception {
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 void testRuntimeClasspathTransform() throws Exception {
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);

View File

@ -28,22 +28,24 @@
* @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);

View File

@ -34,7 +34,7 @@
*
*/
@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 void setUp() throws Exception {
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 void testCompileResolution() throws Exception {
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 void testRuntimeResolution() throws Exception {
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);

View File

@ -41,7 +41,7 @@
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 @@ protected String getProjectsDirectory() {
}
@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 void testEnsureResolverSessionHasMavenWorkspaceReader() throws Exception
}
@Test
public void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws Exception {
void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws Exception {
MavenExecutionRequest request =
createMavenExecutionRequest(getProject("cyclic-reference")).setGoals(asList("validate"));
@ -87,7 +87,7 @@ public void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws
}
@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));

View File

@ -37,7 +37,7 @@
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 @@ protected String getProjectsDirectory() {
}
@Test
public void testDependencyInjection() throws Exception {
void testDependencyInjection() throws Exception {
PlexusContainer container = getContainer();
ComponentDescriptor<? extends AbstractMavenLifecycleParticipant> cd =
@ -122,7 +122,7 @@ public void testDependencyInjection() throws Exception {
}
@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);

View File

@ -36,7 +36,7 @@
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 void testExclusionsInDependencies()
*/
@Test
public void testSystemScopeDependencies() throws Exception {
void testSystemScopeDependencies() throws Exception {
MavenSession session = createMavenSession(null);
MavenProject project = session.getCurrentProject();
@ -88,7 +88,7 @@ public void testSystemScopeDependencies() throws Exception {
}
@Test
public void testSystemScopeDependencyIsPresentInTheCompileClasspathElements() throws Exception {
void testSystemScopeDependencyIsPresentInTheCompileClasspathElements() throws Exception {
File pom = getProject("it0063");
Properties eps = new Properties();

View File

@ -32,12 +32,12 @@
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());

View File

@ -31,18 +31,18 @@
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 void testExcludeExact() {
}
@Test
public void testExcludeNoMatch() {
void testExcludeNoMatch() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("org.apache.maven");
exclusion.setArtifactId("maven-model");
@ -62,7 +62,7 @@ public void testExcludeNoMatch() {
}
@Test
public void testExcludeGroupIdWildcard() {
void testExcludeGroupIdWildcard() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("*");
exclusion.setArtifactId("maven-core");
@ -72,7 +72,7 @@ public void testExcludeGroupIdWildcard() {
}
@Test
public void testExcludeGroupIdWildcardNoMatch() {
void testExcludeGroupIdWildcardNoMatch() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("*");
exclusion.setArtifactId("maven-compat");
@ -82,7 +82,7 @@ public void testExcludeGroupIdWildcardNoMatch() {
}
@Test
public void testExcludeArtifactIdWildcard() {
void testExcludeArtifactIdWildcard() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("org.apache.maven");
exclusion.setArtifactId("*");
@ -92,7 +92,7 @@ public void testExcludeArtifactIdWildcard() {
}
@Test
public void testExcludeArtifactIdWildcardNoMatch() {
void testExcludeArtifactIdWildcardNoMatch() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("org.apache.groovy");
exclusion.setArtifactId("*");
@ -102,7 +102,7 @@ public void testExcludeArtifactIdWildcardNoMatch() {
}
@Test
public void testExcludeAllWildcard() {
void testExcludeAllWildcard() {
Exclusion exclusion = new Exclusion();
exclusion.setGroupId("*");
exclusion.setArtifactId("*");
@ -112,7 +112,7 @@ public void testExcludeAllWildcard() {
}
@Test
public void testMultipleExclusionsExcludeArtifactIdWildcard() {
void testMultipleExclusionsExcludeArtifactIdWildcard() {
Exclusion exclusion1 = new Exclusion();
exclusion1.setGroupId("org.apache.groovy");
exclusion1.setArtifactId("*");
@ -127,7 +127,7 @@ public void testMultipleExclusionsExcludeArtifactIdWildcard() {
}
@Test
public void testMultipleExclusionsExcludeGroupIdWildcard() {
void testMultipleExclusionsExcludeGroupIdWildcard() {
Exclusion exclusion1 = new Exclusion();
exclusion1.setGroupId("*");
exclusion1.setArtifactId("maven-model");

View File

@ -37,17 +37,17 @@
/**
* @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 @@ private Xpp3Dom toConfig(String xml) {
}
@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 void testMinimal() throws BeanConfigurationException {
}
@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 void testPreAndPostProcessing() throws BeanConfigurationException {
}
@Test
public void testChildConfigurationElement() throws BeanConfigurationException {
void testChildConfigurationElement() throws BeanConfigurationException {
SomeBean bean = new SomeBean();
Xpp3Dom config = toConfig("<wrapper><file>test</file></wrapper>");

View File

@ -35,17 +35,17 @@
/**
* @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 @@ private Xpp3Dom toConfig(String xml) {
}
@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 void testMinimal() throws BeanConfigurationException {
}
@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 void testPreAndPostProcessing() throws BeanConfigurationException {
}
@Test
public void testChildConfigurationElement() throws BeanConfigurationException {
void testChildConfigurationElement() throws BeanConfigurationException {
SomeBean bean = new SomeBean();
Xpp3Dom config = toConfig("<wrapper><file>test</file></wrapper>");

View File

@ -35,7 +35,7 @@
/**
* @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 void testJdk7ipv6() {
}
@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 void testHandleExceptionAetherClassNotFound() {
}
@Test
public void testHandleExceptionNoClassDefFoundErrorNull() {
void testHandleExceptionNoClassDefFoundErrorNull() {
Throwable cause2 = new NoClassDefFoundError();
Plugin plugin = new Plugin();
Exception cause = new PluginContainerException(plugin, null, null, cause2);

View File

@ -31,18 +31,18 @@
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 void resumeFromGetsDetermined() {
}
@Test
public void resumeFromIsIgnoredWhenFirstProjectFails() {
void resumeFromIsIgnoredWhenFirstProjectFails() {
MavenProject projectA = createFailedMavenProject("A");
MavenProject projectB = createMavenProject("B");
executionResult.setTopologicallySortedProjects(asList(projectA, projectB));
@ -65,7 +65,7 @@ public void resumeFromIsIgnoredWhenFirstProjectFails() {
}
@Test
public void projectsSucceedingAfterFailedProjectsAreExcluded() {
void projectsSucceedingAfterFailedProjectsAreExcluded() {
MavenProject projectA = createSucceededMavenProject("A");
MavenProject projectB = createFailedMavenProject("B");
MavenProject projectC = createSucceededMavenProject("C");
@ -78,7 +78,7 @@ public void projectsSucceedingAfterFailedProjectsAreExcluded() {
}
@Test
public void projectsDependingOnFailedProjectsAreNotExcluded() {
void projectsDependingOnFailedProjectsAreNotExcluded() {
MavenProject projectA = createSucceededMavenProject("A");
MavenProject projectB = createFailedMavenProject("B");
MavenProject projectC = createSkippedMavenProject("C");
@ -92,7 +92,7 @@ public void projectsDependingOnFailedProjectsAreNotExcluded() {
}
@Test
public void projectsFailingAfterAnotherFailedProjectAreNotExcluded() {
void projectsFailingAfterAnotherFailedProjectAreNotExcluded() {
MavenProject projectA = createSucceededMavenProject("A");
MavenProject projectB = createFailedMavenProject("B");
MavenProject projectC = createSucceededMavenProject("C");

View File

@ -32,11 +32,11 @@
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 void resumeFromPropertyGetsApplied() {
}
@Test
public void resumeFromPropertyDoesNotOverrideExistingRequestParameters() {
void resumeFromPropertyDoesNotOverrideExistingRequestParameters() {
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
request.setResumeFrom(":module-b");
Properties properties = new Properties();
@ -59,7 +59,7 @@ public void resumeFromPropertyDoesNotOverrideExistingRequestParameters() {
}
@Test
public void projectsFromPropertyGetsAddedToExistingRequestParameters() {
void projectsFromPropertyGetsAddedToExistingRequestParameters() {
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
List<String> selectedProjects = new ArrayList<>();
selectedProjects.add(":module-a");
@ -75,7 +75,7 @@ public void projectsFromPropertyGetsAddedToExistingRequestParameters() {
}
@Test
public void selectedProjectsAreNotAddedWhenPropertyValueIsEmpty() {
void selectedProjectsAreNotAddedWhenPropertyValueIsEmpty() {
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
Properties properties = new Properties();
properties.setProperty("remainingProjects", "");
@ -86,7 +86,7 @@ public void selectedProjectsAreNotAddedWhenPropertyValueIsEmpty() {
}
@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/");

View File

@ -32,12 +32,12 @@
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();

View File

@ -32,9 +32,9 @@
/**
* @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 void testCopyDefault() {
}
@Test
public void testResultWithNullTopologicallySortedProjectsIsEmptyList() {
void testResultWithNullTopologicallySortedProjectsIsEmptyList() {
MavenExecutionResult result = new DefaultMavenExecutionResult();
result.setTopologicallySortedProjects(null);
List<MavenProject> projects = result.getTopologicallySortedProjects();

View File

@ -30,9 +30,9 @@
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 void testNestedEnter() throws Exception {
}
@Test
public void testMultiKeyInstance() throws Exception {
void testMultiKeyInstance() throws Exception {
MojoExecutionScope scope = new MojoExecutionScope();
scope.enter();

View File

@ -331,7 +331,7 @@ void testGetReactorProjects(
}
@BeforeEach
public void before() throws Exception {
void before() throws Exception {
graphBuilder = new DefaultGraphBuilder(
mock(BuildResumptionDataRepository.class),
pomlessCollectionStrategy,

View File

@ -33,7 +33,7 @@
/**
* @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 void testGetSortedProjects() throws DuplicateProjectException, CycleDetec
}
@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 void testVerifyExpectedParentStructure() throws CycleDetectedException, D
}
@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 void testVerifyThatDownstreamProjectsComeInSortedOrder()
}
@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 void testTransitivesInOrder() throws CycleDetectedException, DuplicatePro
}
@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 void testNonTransitivesInOrder() throws CycleDetectedException, Duplicate
}
@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 void testWithTransitiveOnly() throws CycleDetectedException, DuplicatePro
}
@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 void testWithMissingTransitiveOnly() throws CycleDetectedException, Dupli
}
@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));

View File

@ -25,10 +25,10 @@
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 void testBuilderCommon() {
}
@Test
public void testMojoExecutor() {
void testMojoExecutor() {
List<String> msgs = new ArrayList<>();
msgs.add("*****************************************************************");
msgs.add("* An aggregator Mojo is already executing in parallel build, *");

View File

@ -37,9 +37,9 @@
/**
* 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 void isLocalRepositoryArtifactTest() {
}
@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 void isMissingArtifactTest() {
}
@Test
public void lookupCollectStepDataTest() {
void lookupCollectStepDataTest() {
RequestTrace doesNotHaveIt =
RequestTrace.newChild(null, "foo").newChild("bar").newChild("baz");
assertThat(ReverseTreeRepositoryListener.lookupCollectStepData(doesNotHaveIt), nullValue());

View File

@ -32,10 +32,10 @@
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");

View File

@ -55,7 +55,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
@PlexusTest
public class TestApi {
class TestApi {
Session session;

View File

@ -28,9 +28,9 @@
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 =

View File

@ -43,47 +43,47 @@
* @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());

View File

@ -36,7 +36,7 @@
*
* @author Kristian Rosenvold
*/
public class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentTestCase {
class LifecycleExecutorSubModulesTest extends AbstractCoreMavenComponentTestCase {
@Inject
private DefaultLifecycles defaultLifeCycles;
@ -66,7 +66,7 @@ protected String getProjectsDirectory() {
}
@Test
public void testCreation() throws Exception {
void testCreation() throws Exception {
assertNotNull(defaultLifeCycles);
assertNotNull(mojoExecutor);
assertNotNull(lifeCycleBuilder);

View File

@ -56,7 +56,7 @@
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 @@ protected String getProjectsDirectory() {
// -----------------------------------------------------------------------------------------------
@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 void testCalculationOfBuildPlanWithIndividualTaskWherePluginIsSpecifiedIn
}
@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 void testCalculationOfBuildPlanWithIndividualTaskOfTheCleanLifecycle() th
}
@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 void testCalculationOfBuildPlanWithMultipleExecutionsOfModello() throws E
}
@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 void testLifecycleQueryingUsingADefaultLifecyclePhase() throws Exception
}
@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 @@ MavenExecutionPlan calculateExecutionPlan(MavenSession session, String... tasks)
}
@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 void testInvalidGoalName() throws Exception {
}
@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 void testPluginPrefixRetrieval() throws Exception {
// 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 void testFindingPluginPrefixForCleanClean() throws Exception {
}
@Test
public void testSetupMojoExecution() throws Exception {
void testSetupMojoExecution() throws Exception {
File pom = getProject("mojo-configuration");
MavenSession session = createMavenSession(pom);
@ -385,7 +385,7 @@ public void testSetupMojoExecution() throws Exception {
}
@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() {

View File

@ -32,10 +32,10 @@
/**
* @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 void testFindLastInPhase() throws Exception {
}
@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 void testThreadSafeMojos() throws Exception {
}
@Test
public void testFindLastWhenFirst() throws Exception {
void testFindLastWhenFirst() throws Exception {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
ExecutionPlanItem beerPhase = plan.findLastInPhase(
@ -62,7 +62,7 @@ public void testFindLastWhenFirst() throws Exception {
}
@Test
public void testFindLastInPhaseMisc() throws Exception {
void testFindLastInPhaseMisc() throws Exception {
MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExecutionPlan();
assertNull(plan.findLastInPhase("pacXkage"));

View File

@ -29,10 +29,10 @@
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();

View File

@ -48,9 +48,9 @@
/**
* @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 void testConcurrencyGraphPrimaryVersion()
}
@Test
public void testConcurrencyGraphDifferentCompletionOrder()
void testConcurrencyGraphDifferentCompletionOrder()
throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException,
PluginResolutionException, LifecyclePhaseNotFoundException, LifecycleNotFoundException {

View File

@ -36,7 +36,7 @@
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 @@ protected String getProjectsDirectory() {
}
@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;

View File

@ -34,10 +34,10 @@
/**
* @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);

View File

@ -44,12 +44,12 @@
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

View File

@ -31,9 +31,9 @@
/**
* @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();

View File

@ -32,9 +32,9 @@
/**
* @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();

View File

@ -30,9 +30,9 @@
/**
* @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();

View File

@ -37,11 +37,11 @@
/**
* @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 void testResolveBuildPlan() throws Exception {
}
@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 void testDefaultBindingPluginsWarning() throws Exception {
}
@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();

View File

@ -29,10 +29,10 @@
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());

View File

@ -51,7 +51,7 @@
/**
* @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 void testSingleThreaded() throws Exception {
}
@Test
public void testMultiThreaded() throws Exception {
void testMultiThreaded() throws Exception {
ProjectBuildList projectBuildList = getProjectBuildList();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

View File

@ -31,31 +31,31 @@
*
* @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));

View File

@ -30,9 +30,9 @@
/**
* @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 void testToString() {
}
@Test
public void testSet() {
void testSet() {
LifecyclePhase phase = new LifecyclePhase();
assertNull(phase.getMojos());

View File

@ -39,7 +39,7 @@
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 @@ protected String getProjectsDirectory() {
}
@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 void testPluginLoading() throws Exception {
}
@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 void testMojoDescriptorRetrieval() throws Exception {
// 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 void testSurefirePlugin() throws Exception {
}
@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 void testMojoConfigurationIsMergedCorrectly() throws Exception {}
* 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 void testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself() th
// 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 @@ protected void assertPluginDescriptor(
}
@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 void testPluginRealmCache() throws Exception {
}
@Test
public void testBuildExtensionsPluginLoading() throws Exception {
void testBuildExtensionsPluginLoading() throws Exception {
RepositoryRequest repositoryRequest = new DefaultRepositoryRequest();
repositoryRequest.setLocalRepository(getLocalRepository());
repositoryRequest.setRemoteRepositories(getPluginArtifactRepositories());

View File

@ -33,12 +33,12 @@
* @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 void testMissingRequiredStringArrayTypeParameter() {
}
@Test
public void testMissingRequiredCollectionTypeParameter() {
void testMissingRequiredCollectionTypeParameter() {
MojoDescriptor mojoDescriptor = new MojoDescriptor();
mojoDescriptor.setGoal("goal");
PluginDescriptor pluginDescriptor = new PluginDescriptor();
@ -102,7 +102,7 @@ public void testMissingRequiredCollectionTypeParameter() {
}
@Test
public void testMissingRequiredMapTypeParameter() {
void testMissingRequiredMapTypeParameter() {
MojoDescriptor mojoDescriptor = new MojoDescriptor();
mojoDescriptor.setGoal("goal");
PluginDescriptor pluginDescriptor = new PluginDescriptor();
@ -134,7 +134,7 @@ public void testMissingRequiredMapTypeParameter() {
}
@Test
public void testMissingRequiredPropertiesTypeParameter() {
void testMissingRequiredPropertiesTypeParameter() {
MojoDescriptor mojoDescriptor = new MojoDescriptor();
mojoDescriptor.setGoal("goal");
PluginDescriptor pluginDescriptor = new PluginDescriptor();

View File

@ -58,14 +58,14 @@
/**
* @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 void testPluginDescriptorExpressionReference() throws Exception {
}
@Test
public void testPluginArtifactsExpressionReference() throws Exception {
void testPluginArtifactsExpressionReference() throws Exception {
MojoExecution exec = newMojoExecution();
Artifact depArtifact = createArtifact("group", "artifact", "1");
@ -105,7 +105,7 @@ public void testPluginArtifactsExpressionReference() throws Exception {
}
@Test
public void testPluginArtifactMapExpressionReference() throws Exception {
void testPluginArtifactMapExpressionReference() throws Exception {
MojoExecution exec = newMojoExecution();
Artifact depArtifact = createArtifact("group", "artifact", "1");
@ -132,7 +132,7 @@ public void testPluginArtifactMapExpressionReference() throws Exception {
}
@Test
public void testPluginArtifactIdExpressionReference() throws Exception {
void testPluginArtifactIdExpressionReference() throws Exception {
MojoExecution exec = newMojoExecution();
MavenSession session = newMavenSession();
@ -148,7 +148,7 @@ public void testPluginArtifactIdExpressionReference() throws Exception {
}
@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 void testValueExtractionWithAPomValueContainingAPath() throws Exception {
}
@Test
public void testEscapedVariablePassthrough() throws Exception {
void testEscapedVariablePassthrough() throws Exception {
String var = "${var}";
Model model = new Model();
@ -185,7 +185,7 @@ public void testEscapedVariablePassthrough() throws Exception {
}
@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 void testEscapedVariablePassthroughInLargerExpression() throws Exception
}
@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 void testMultipleSubExpressionsInLargerExpression() throws Exception {
}
@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 void testMissingPOMPropertyRefInLargerExpression() throws Exception {
}
@Test
public void testPOMPropertyExtractionWithMissingProject_WithDotNotation() throws Exception {
void testPOMPropertyExtractionWithMissingProject_WithDotNotation() throws Exception {
String key = "m2.name";
String checkValue = "value";
@ -252,7 +252,7 @@ public void testPOMPropertyExtractionWithMissingProject_WithDotNotation() throws
}
@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 void testBasedirExtractionWithMissingProject() throws Exception {
}
@Test
public void testValueExtractionFromSystemPropertiesWithMissingProject() throws Exception {
void testValueExtractionFromSystemPropertiesWithMissingProject() throws Exception {
String sysprop = "PPEET_sysprop1";
Properties executionProperties = new Properties();
@ -278,7 +278,7 @@ public void testValueExtractionFromSystemPropertiesWithMissingProject() throws E
}
@Test
public void testValueExtractionFromSystemPropertiesWithMissingProject_WithDotNotation() throws Exception {
void testValueExtractionFromSystemPropertiesWithMissingProject_WithDotNotation() throws Exception {
String sysprop = "PPEET.sysprop2";
Properties executionProperties = new Properties();
@ -308,7 +308,7 @@ private static MavenSession createSession(PlexusContainer container, ArtifactRep
}
@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 void testLocalRepositoryExtraction() throws Exception {
}
@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 void testTwoExpressions() throws Exception {
}
@Test
public void testShouldExtractPluginArtifacts() throws Exception {
void testShouldExtractPluginArtifacts() throws Exception {
PluginDescriptor pd = new PluginDescriptor();
Artifact artifact = createArtifact("testGroup", "testArtifact", "1.0");

View File

@ -30,12 +30,12 @@
/**
* @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);

View File

@ -36,7 +36,7 @@
/**
* @author Michael Simacek
*/
public class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase {
class MavenPluginValidatorTest extends AbstractCoreMavenComponentTestCase {
@Inject
private MavenPluginValidator mavenPluginValidator;
@ -45,7 +45,7 @@ protected String getProjectsDirectory() {
}
@Test
public void testValidate() {
void testValidate() {
Artifact plugin = new DefaultArtifact(
"org.apache.maven.its.plugins",
"maven-it-plugin",
@ -64,7 +64,7 @@ public void testValidate() {
}
@Test
public void testInvalidGroupId() {
void testInvalidGroupId() {
Artifact plugin = new DefaultArtifact(
"org.apache.maven.its.plugins",
"maven-it-plugin",
@ -83,7 +83,7 @@ public void testInvalidGroupId() {
}
@Test
public void testInvalidArtifactId() {
void testInvalidArtifactId() {
Artifact plugin = new DefaultArtifact(
"org.apache.maven.its.plugins",
"maven-it-plugin",
@ -102,7 +102,7 @@ public void testInvalidArtifactId() {
}
@Test
public void testInvalidVersion() {
void testInvalidVersion() {
Artifact plugin = new DefaultArtifact(
"org.apache.maven.its.plugins",
"maven-it-plugin",

View File

@ -45,7 +45,7 @@
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 @@ protected MavenProject getProject(Artifact pom, boolean allowStub) throws Except
* @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 void testBuildFromMiddlePom() throws Exception {
@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 void testDuplicatePluginDefinitionsMerged() throws Exception {
}
@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 void testFutureModelVersion() throws Exception {
}
@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 void testPastModelVersion() throws Exception {
}
@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 void testFutureSchemaModelVersion() throws Exception {
}
@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 @@ protected ArtifactRepository getLocalRepository() throws Exception {
}
@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 void testPartialResultUponBadDependencyDeclaration() throws Exception {
* @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 void testBuildValidParentVersionRangeLocally() throws Exception {
* @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 void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Excep
* @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 void testBuildParentVersionRangeLocallyWithChildRevisionExpression() thro
* @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 void testBuildParentVersionRangeExternally() throws Exception {
* @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 void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Ex
* @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 void testBuildParentVersionRangeExternallyWithChildProjectVersionExpressi
* @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