Skip to content

Commit c041742

Browse files
JUnit Jupiter best practices (#111)
Co-authored-by: Moderne <[email protected]>
1 parent 34cf569 commit c041742

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/test/java/org/codehaus/plexus/resource/ResourceManagerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ResourceManagerTest {
4949
private ResourceManager resourceManager;
5050

5151
@Test
52-
void testResourceManagerRetrievingInputStreams() throws Exception {
52+
void resourceManagerRetrievingInputStreams() throws Exception {
5353
InputStream in;
5454

5555
File absoluteFile = new File(getBasedir(), "src/test/file-resources/dir/file.txt").getAbsoluteFile();
@@ -72,7 +72,7 @@ void testResourceManagerRetrievingInputStreams() throws Exception {
7272
}
7373

7474
@Test
75-
void testResourceManagerRetrievingFiles() throws Exception {
75+
void resourceManagerRetrievingFiles() throws Exception {
7676
File f;
7777

7878
File absoluteFile = new File(getBasedir(), "src/test/file-resources/dir/file.txt").getAbsoluteFile();
@@ -95,7 +95,7 @@ void testResourceManagerRetrievingFiles() throws Exception {
9595
}
9696

9797
@Test
98-
void testResourceManagerRetrievingFilesToSpecificLocation() throws Exception {
98+
void resourceManagerRetrievingFilesToSpecificLocation() throws Exception {
9999
File outDir = new File(getBasedir(), "target/test/unit/output-directory");
100100

101101
resourceManager.setOutputDirectory(outDir);

src/test/java/org/codehaus/plexus/resource/loader/FileResourceLoaderTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@
3939
@PlexusTest
4040
class FileResourceLoaderTest extends AbstractResourceLoaderTest {
4141
@Test
42-
void testLookupWithAAbsolutePathName() throws Exception {
42+
void lookupWithAAbsolutePathName() throws Exception {
4343
assertResource("/dir/file.txt", "file.txt");
4444
}
4545

4646
@Test
47-
void testLookupWithARelativePath() throws Exception {
47+
void lookupWithARelativePath() throws Exception {
4848
assertResource("dir/file.txt", "file.txt");
4949
}
5050

5151
@Test
52-
void testLookupWhenTheResourceIsMissing() throws Exception {
52+
void lookupWhenTheResourceIsMissing() throws Exception {
5353
assertMissingResource("/foo.txt");
5454

5555
assertMissingResource("foo.txt");
5656
}
5757

5858
@Test
59-
void testPlexusResource() throws Exception {
59+
void plexusResource() throws Exception {
6060
PlexusResource resource = resourceLoader.getResource("/dir/file.txt");
6161
final File f = new File("src/test/file-resources", "/dir/file.txt");
6262
assertEquals(f.getAbsolutePath(), resource.getFile().getPath());

src/test/java/org/codehaus/plexus/resource/loader/ThreadContextClasspathResourceLoaderTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@
4141
@PlexusTest
4242
class ThreadContextClasspathResourceLoaderTest extends AbstractResourceLoaderTest {
4343
@Test
44-
void testLookupWithAAbsolutePathName() throws Exception {
44+
void lookupWithAAbsolutePathName() throws Exception {
4545
assertResource("/dir/classpath.txt", "classpath.txt");
4646
}
4747

4848
@Test
49-
void testLookupWithARelativePath() throws Exception {
49+
void lookupWithARelativePath() throws Exception {
5050
assertResource("dir/classpath.txt", "classpath.txt");
5151
}
5252

5353
@Test
54-
void testLookupWhenTheResourceIsMissing() throws Exception {
54+
void lookupWhenTheResourceIsMissing() throws Exception {
5555
assertMissingResource("/foo.txt");
5656

5757
assertMissingResource("foo.txt");
5858
}
5959

6060
@Test
61-
void testLookupWithANullThreadContextClassLoader() throws Exception {
61+
void lookupWithANullThreadContextClassLoader() throws Exception {
6262
ClassLoader loader = Thread.currentThread().getContextClassLoader();
6363

6464
Thread.currentThread().setContextClassLoader(null);
@@ -71,7 +71,7 @@ void testLookupWithANullThreadContextClassLoader() throws Exception {
7171
}
7272

7373
@Test
74-
void testPlexusResource() throws Exception {
74+
void plexusResource() throws Exception {
7575
PlexusResource resource = resourceLoader.getResource("/dir/classpath.txt");
7676
assertNull(resource.getFile());
7777
assertNull(resource.getURI());

src/test/java/org/codehaus/plexus/resource/loader/URLResourceLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class URLResourceLoaderTest {
2121
private ResourceLoader resourceLoader = new URLResourceLoader();
2222

2323
@Test
24-
void testMalformedURL() {
24+
void malformedURL() {
2525
try {
2626
resourceLoader.getResource("LICENSE.txt");
2727
fail();

src/test/java/org/codehaus/plexus/resource/loader/manager/ResourceManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ResourceManagerTest {
4242
private ResourceManager resourceManager;
4343

4444
@Test
45-
void testFoo() {
45+
void foo() {
4646
assertNotNull(resourceManager);
4747
}
4848
}

0 commit comments

Comments
 (0)