Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,36 @@ class ClassWorldTest extends AbstractClassWorldsTestCase {
private ClassWorld world;

@BeforeEach
public void setUp() {
void setUp() {
this.world = new ClassWorld();
}

@AfterEach
public void tearDown() {
void tearDown() {
this.world = null;
}

@Test
void testEmpty() {
void empty() {
assertTrue(this.world.getRealms().isEmpty());
}

@Test
void testNewRealm() throws Exception {
void newRealm() throws Exception {
ClassRealm realm = this.world.newRealm("foo");

assertNotNull(realm);
}

@Test
void testGetRealm() throws Exception {
void getRealm() throws Exception {
ClassRealm realm = this.world.newRealm("foo");

assertSame(realm, this.world.getRealm("foo"));
}

@Test
void testNewRealm_Duplicate() {
void newRealmDuplicate() {
try {
this.world.newRealm("foo");
this.world.newRealm("foo");
Expand All @@ -81,7 +81,7 @@ void testNewRealm_Duplicate() {
}

@Test
void testGetRealm_NoSuch() {
void getRealmNoSuch() {
try {
this.world.getRealm("foo");
fail("throw NoSuchRealmException");
Expand All @@ -95,7 +95,7 @@ void testGetRealm_NoSuch() {
}

@Test
void testGetRealms() throws Exception {
void getRealms() throws Exception {
assertTrue(this.world.getRealms().isEmpty());

ClassRealm foo = this.world.newRealm("foo");
Expand All @@ -112,7 +112,7 @@ void testGetRealms() throws Exception {
}

@Test
void testPLX334() throws Exception {
void plx334() throws Exception {
ClassLoader loader = new URLClassLoader(new URL[] {getJarUrl("component1-1.0.jar")});
world.newRealm("netbeans", loader);
ClassRealm plexus = world.newRealm("plexus");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class UrlUtilsTest {

@Test
public void testNormalizeUrlPath() {
void normalizeUrlPath() {
assertEquals("org/codehaus/Test.class", UrlUtils.normalizeUrlPath("org/codehaus/Test.class"));
assertEquals("org/Test.class", UrlUtils.normalizeUrlPath("org/codehaus/../Test.class"));
assertEquals("../../some.jar/org/Test.class", UrlUtils.normalizeUrlPath("../../some.jar/org/Test.class"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ConfigurationParserTest extends AbstractClassWorldsTestCase {
final ConfigurationParser configurator = new ConfigurationParser(null, System.getProperties());

@Test
void testFilter_Unterminated() {
void filterUnterminated() {
try {
this.configurator.filter("${cheese");
fail("throw ConfigurationException");
Expand All @@ -23,7 +23,7 @@ void testFilter_Unterminated() {
}

@Test
void testFilter_Solitary() throws Exception {
void filterSolitary() throws Exception {
System.setProperty("classworlds.test.prop", "test prop value");

String result = this.configurator.filter("${classworlds.test.prop}");
Expand All @@ -32,7 +32,7 @@ void testFilter_Solitary() throws Exception {
}

@Test
void testFilter_AtStart() throws Exception {
void filterAtStart() throws Exception {
System.setProperty("classworlds.test.prop", "test prop value");

String result = this.configurator.filter("${classworlds.test.prop}cheese");
Expand All @@ -41,7 +41,7 @@ void testFilter_AtStart() throws Exception {
}

@Test
void testFilter_AtEnd() throws Exception {
void filterAtEnd() throws Exception {
System.setProperty("classworlds.test.prop", "test prop value");

String result = this.configurator.filter("cheese${classworlds.test.prop}");
Expand All @@ -50,7 +50,7 @@ void testFilter_AtEnd() throws Exception {
}

@Test
void testFilter_Multiple() throws Exception {
void filterMultiple() throws Exception {
System.setProperty("classworlds.test.prop.one", "test prop value one");

System.setProperty("classworlds.test.prop.two", "test prop value two");
Expand All @@ -62,7 +62,7 @@ void testFilter_Multiple() throws Exception {
}

@Test
void testFilter_NonExistent() {
void filterNonExistent() {
try {
this.configurator.filter("${gollygeewillikers}");
fail("throw ConfigurationException");
Expand All @@ -73,7 +73,7 @@ void testFilter_NonExistent() {
}

@Test
void testFilter_InMiddle() throws Exception {
void filterInMiddle() throws Exception {
System.setProperty("classworlds.test.prop", "test prop value");

String result = this.configurator.filter("cheese${classworlds.test.prop}toast");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class ConfiguratorTest extends AbstractClassWorldsTestCase {
private Configurator configurator;

@BeforeEach
public void setUp() {
void setUp() {
this.launcher = new Launcher();
this.configurator = new Configurator(this.launcher);
}

@AfterEach
public void tearDown() {
void tearDown() {
this.launcher = null;
this.configurator = null;
System.getProperties().remove("set.using.existent");
Expand All @@ -60,7 +60,7 @@ public void tearDown() {
}

@Test
void testConfigure_Nonexistent() throws Exception {
void configureNonexistent() throws Exception {
try {
this.configurator.configure(getConfigPath("notfound.conf"));
fail("throw FileNotFoundException");
Expand All @@ -70,7 +70,7 @@ void testConfigure_Nonexistent() throws Exception {
}

@Test
void testConfigure_DuplicateMain() throws Exception {
void configureDuplicateMain() throws Exception {
try {
this.configurator.configure(getConfigPath("dupe-main.conf"));
fail("throw ConfigurationException");
Expand All @@ -81,7 +81,7 @@ void testConfigure_DuplicateMain() throws Exception {
}

@Test
void testConfigure_DuplicateRealm() throws Exception {
void configureDuplicateRealm() throws Exception {
try {
this.configurator.configure(getConfigPath("dupe-realm.conf"));
fail("throw DuplicateRealmException");
Expand All @@ -92,7 +92,7 @@ void testConfigure_DuplicateRealm() throws Exception {
}

@Test
void testConfigure_EarlyImport() throws Exception {
void configureEarlyImport() throws Exception {
try {
this.configurator.configure(getConfigPath("early-import.conf"));
fail("throw ConfigurationException");
Expand All @@ -103,7 +103,7 @@ void testConfigure_EarlyImport() throws Exception {
}

@Test
void testConfigure_RealmSyntax() throws Exception {
void configureRealmSyntax() throws Exception {
try {
this.configurator.configure(getConfigPath("realm-syntax.conf"));
fail("throw ConfigurationException");
Expand All @@ -114,7 +114,7 @@ void testConfigure_RealmSyntax() throws Exception {
}

@Test
void testConfigure_Valid() throws Exception {
void configureValid() throws Exception {
this.configurator.configure(getConfigPath("valid.conf"));

assertEquals("org.apache.maven.app.App", this.launcher.getMainClassName());
Expand Down Expand Up @@ -161,7 +161,7 @@ void testConfigure_Valid() throws Exception {
}

@Test
void testConfigure_Optionally_NonExistent() throws Exception {
void configureOptionallyNonExistent() throws Exception {
this.configurator.configure(getConfigPath("optionally-nonexistent.conf"));

assertEquals("org.apache.maven.app.App", this.launcher.getMainClassName());
Expand All @@ -184,7 +184,7 @@ void testConfigure_Optionally_NonExistent() throws Exception {
}

@Test
void testConfigure_Optionally_Existent() throws Exception {
void configureOptionallyExistent() throws Exception {
this.configurator.configure(getConfigPath("optionally-existent.conf"));

assertEquals("org.apache.maven.app.App", this.launcher.getMainClassName());
Expand All @@ -209,7 +209,7 @@ void testConfigure_Optionally_Existent() throws Exception {
}

@Test
void testConfigure_Unhandled() throws Exception {
void configureUnhandled() throws Exception {
try {
this.configurator.configure(getConfigPath("unhandled.conf"));
fail("throw ConfigurationException");
Expand All @@ -220,7 +220,7 @@ void testConfigure_Unhandled() throws Exception {
}

@Test
void testSet_Using_Existent() throws Exception {
void setUsingExistent() throws Exception {
assertNull(System.getProperty("set.using.existent"));

this.configurator.configure(getConfigPath("set-using-existent.conf"));
Expand All @@ -229,7 +229,7 @@ void testSet_Using_Existent() throws Exception {
}

@Test
void testSet_Using_NonExistent() throws Exception {
void setUsingNonExistent() throws Exception {
assertNull(System.getProperty("set.using.nonexistent"));

this.configurator.configure(getConfigPath("set-using-nonexistent.conf"));
Expand All @@ -238,7 +238,7 @@ void testSet_Using_NonExistent() throws Exception {
}

@Test
void testSet_Using_NonExistent_Default() throws Exception {
void setUsingNonExistentDefault() throws Exception {
assertNull(System.getProperty("set.using.nonexistent.default"));

this.configurator.configure(getConfigPath("set-using-nonexistent.conf"));
Expand All @@ -247,7 +247,7 @@ void testSet_Using_NonExistent_Default() throws Exception {
}

@Test
void testSet_Using_NonExistent_Override() throws Exception {
void setUsingNonExistentOverride() throws Exception {
assertNull(System.getProperty("set.using.default"));
System.setProperty("set.using.default", "testSet_Using_NonExistent_Override");

Expand All @@ -257,7 +257,7 @@ void testSet_Using_NonExistent_Override() throws Exception {
}

@Test
void testSet_Using_Existent_Override() throws Exception {
void setUsingExistentOverride() throws Exception {
assertNull(System.getProperty("set.using.existent"));
System.setProperty("set.using.existent", "testSet_Using_Existent_Override");

Expand All @@ -267,7 +267,7 @@ void testSet_Using_Existent_Override() throws Exception {
}

@Test
void testSet_Using_Existent_Default() throws Exception {
void setUsingExistentDefault() throws Exception {
assertNull(System.getProperty("set.using.default"));

this.configurator.configure(getConfigPath("set-using-existent.conf"));
Expand All @@ -276,7 +276,7 @@ void testSet_Using_Existent_Default() throws Exception {
}

@Test
void testSet_Using_Missing_Default() throws Exception {
void setUsingMissingDefault() throws Exception {
assertNull(System.getProperty("set.using.missing"));

this.configurator.configure(getConfigPath("set-using-missing.conf"));
Expand All @@ -285,7 +285,7 @@ void testSet_Using_Missing_Default() throws Exception {
}

@Test
void testSet_Using_Missing_Override() throws Exception {
void setUsingMissingOverride() throws Exception {
assertNull(System.getProperty("set.using.missing"));
System.setProperty("set.using.missing", "testSet_Using_Missing_Override");

Expand All @@ -295,7 +295,7 @@ void testSet_Using_Missing_Override() throws Exception {
}

@Test
void testSet_Using_Filtered_Default() throws Exception {
void setUsingFilteredDefault() throws Exception {
assertNull(System.getProperty("set.using.filtered.default"));

this.configurator.configure(getConfigPath("set-using-missing.conf"));
Expand All @@ -305,7 +305,7 @@ void testSet_Using_Filtered_Default() throws Exception {

@SuppressWarnings("OptionalGetWithoutIsPresent")
@Test
void testFromFromFrom() throws Exception {
void fromFromFrom() throws Exception {
this.configurator.configure(getConfigPath("valid-from-from-from.conf"));

assertEquals("com.from.from.from.Main", this.launcher.getMainClassName());
Expand Down
Loading