diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/AbstractFilenameModuleNameExtractorTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/AbstractFilenameModuleNameExtractorTest.java index 356cb11..a1fcb5d 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/AbstractFilenameModuleNameExtractorTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/AbstractFilenameModuleNameExtractorTest.java @@ -30,26 +30,26 @@ public abstract class AbstractFilenameModuleNameExtractorTest { protected abstract ModuleNameExtractor getExtractor(); @Test - void testJarWithoutManifest() throws Exception { + void jarWithoutManifest() throws Exception { String name = getExtractor().extract(Paths.get("src/test/test-data/jar.empty/plexus-java-1.0.0-SNAPSHOT.jar")); assertEquals("plexus.java", name); } @Test - void testJarWithManifest() throws Exception { + void jarWithManifest() throws Exception { String name = getExtractor() .extract(Paths.get("src/test/test-data/jar.manifest.with/plexus-java-1.0.0-SNAPSHOT.jar")); assertEquals("org.codehaus.plexus.languages.java", name); } @Test - void testJarUnsupported() throws Exception { + void jarUnsupported() throws Exception { String name = getExtractor().extract(Paths.get("src/test/test-data/jar.unsupported/jdom-1.0.jar")); assertNull(name); } @Test - void testJarWithSpacesInPath() throws Exception { + void jarWithSpacesInPath() throws Exception { String name = getExtractor() .extract(Paths.get("src/test/test-data/jar with spaces in path/plexus-java-1.0.0-SNAPSHOT.jar")); assertEquals("org.codehaus.plexus.languages.java", name); diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/BinaryModuleInfoParserTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/BinaryModuleInfoParserTest.java index c688b0b..bba54b7 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/BinaryModuleInfoParserTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/BinaryModuleInfoParserTest.java @@ -47,7 +47,7 @@ class BinaryModuleInfoParserTest { private final BinaryModuleInfoParser parser = new BinaryModuleInfoParser(); @Test - void testJarDescriptor() throws Exception { + void jarDescriptor() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor(Paths.get("src/test/test-data/jar.descriptor/asm-6.0_BETA.jar")); @@ -67,7 +67,7 @@ void testJarDescriptor() throws Exception { } @Test - void testMultiReleaseJarDescriptor() throws Exception { + void multiReleaseJarDescriptor() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor( Paths.get("src/test/test-data/jar.mr.descriptor/jloadr-1.0-SNAPSHOT.jar"), JavaVersion.parse("17")); @@ -77,7 +77,7 @@ void testMultiReleaseJarDescriptor() throws Exception { } @Test - void testIncompleteMultiReleaseJarDescriptor() throws Exception { + void incompleteMultiReleaseJarDescriptor() throws Exception { // this jar is missing the Multi-Release: true entry in the Manifest JavaModuleDescriptor descriptor = parser.getModuleDescriptor( Paths.get("src/test/test-data/jar.mr.incomplete.descriptor/jloadr-1.0-SNAPSHOT.jar")); @@ -86,7 +86,7 @@ void testIncompleteMultiReleaseJarDescriptor() throws Exception { } @Test - void testClassicJar() throws Exception { + void classicJar() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor(Paths.get("src/test/test-data/jar.empty/plexus-java-1.0.0-SNAPSHOT.jar")); @@ -94,7 +94,7 @@ void testClassicJar() throws Exception { } @Test - void testOutputDirectoryDescriptor() throws Exception { + void outputDirectoryDescriptor() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor(Paths.get("src/test/test-data/dir.descriptor/out")); @@ -115,14 +115,14 @@ void testOutputDirectoryDescriptor() throws Exception { } @Test - void testClassicOutputDirectory() { + void classicOutputDirectory() { assertThrows( NoSuchFileException.class, () -> parser.getModuleDescriptor(Paths.get("src/test/test-data/dir.empty/out"))); } @Test - void testJModDescriptor() throws Exception { + void jModDescriptor() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor( Paths.get("src/test/test-data/jmod.descriptor/first-jmod-1.0-SNAPSHOT.jmod")); @@ -139,13 +139,13 @@ void testJModDescriptor() throws Exception { } @Test - void testInvalidFile() { + void invalidFile() { assertThrows( IOException.class, () -> parser.getModuleDescriptor(Paths.get("src/test/test-data/nonjar/pom.xml"))); } @Test - void testUses() throws Exception { + void uses() throws Exception { try (InputStream is = Files.newInputStream(Paths.get("src/test/test-data/dir.descriptor.uses/out/module-info.class"))) { JavaModuleDescriptor descriptor = parser.parse(is); @@ -161,7 +161,7 @@ void testUses() throws Exception { } @Test - void testProvides() throws Exception { + void provides() throws Exception { JavaModuleDescriptor descriptor = parser.getModuleDescriptor(Paths.get("src/test/test-data/jar.service/threeten-extra-1.4.jar")); @@ -186,7 +186,7 @@ void testProvides() throws Exception { } @Test - void testRequires() throws Exception { + void requires() throws Exception { try (InputStream is = Files.newInputStream(Paths.get("src/test/test-data/dir.descriptor.requires/out/module-info.class"))) { JavaModuleDescriptor descriptor = parser.parse(is); diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/CmdModuleNameExtractorTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/CmdModuleNameExtractorTest.java index 8430cbf..dc94dda 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/CmdModuleNameExtractorTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/CmdModuleNameExtractorTest.java @@ -27,7 +27,7 @@ class CmdModuleNameExtractorTest { @Test - void testMethodCount() throws Exception { + void methodCount() throws Exception { // ensure that both implementations are in sync assertThat(CmdModuleNameExtractor.class.getDeclaredMethods()).hasSize(2); diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerIT.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerIT.java index a33c7ce..0859fd8 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerIT.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerIT.java @@ -66,7 +66,7 @@ ModuleInfoParser getBinaryModuleInfoParser(Path jdkHome) { } @Test - void testManifestWithoutReflectRequires() throws Exception { + void manifestWithoutReflectRequires() throws Exception { Path abc = Paths.get("src/test/test-data/manifest.without/out"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base").requires("any").build(); @@ -84,7 +84,7 @@ void testManifestWithoutReflectRequires() throws Exception { } @Test - void testEmptyWithReflectRequires() throws Exception { + void emptyWithReflectRequires() throws Exception { Path abc = Paths.get("src/test/test-data/empty/out"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base").requires("a.b.c").build(); @@ -102,17 +102,14 @@ void testEmptyWithReflectRequires() throws Exception { } @Test - void testResolvePathWithException() { - assertThrows(RuntimeException.class, () -> { - Path p = Paths.get("src/test/test-data/jar.empty.invalid.name/101-1.0.0-SNAPSHOT.jar"); - ResolvePathRequest request = ResolvePathRequest.ofPath(p); - - locationManager.resolvePath(request); - }); + void resolvePathWithException() { + Path p = Paths.get("src/test/test-data/jar.empty.invalid.name/101-1.0.0-SNAPSHOT.jar"); + ResolvePathRequest request = ResolvePathRequest.ofPath(p); + assertThrows(RuntimeException.class, () -> locationManager.resolvePath(request)); } @Test - void testClassicJarNameStartsWithNumber() throws Exception { + void classicJarNameStartsWithNumber() throws Exception { Path p = Paths.get("src/test/test-data/jar.empty.invalid.name/101-1.0.0-SNAPSHOT.jar"); ResolvePathsRequest request = ResolvePathsRequest.ofPaths(Collections.singletonList(p)).setMainModuleDescriptor(mockModuleInfoJava); diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerTest.java index 2b8cb04..d758a0c 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/LocationManagerTest.java @@ -57,7 +57,7 @@ ModuleInfoParser getBinaryModuleInfoParser(Path jdkHome) { } @Test - void testNoPaths() throws Exception { + void noPaths() throws Exception { ResolvePathsResult result = locationManager.resolvePaths(ResolvePathsRequest.ofFiles(Collections.emptyList())); assertThat(result.getMainModuleDescriptor()).isNull(); @@ -68,7 +68,7 @@ void testNoPaths() throws Exception { } @Test - void testWithUnknownRequires() throws Exception { + void withUnknownRequires() throws Exception { JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base") .requires("java.base") .requires("jdk.net") @@ -87,7 +87,7 @@ void testWithUnknownRequires() throws Exception { } @Test - void testManifestWithReflectRequires() throws Exception { + void manifestWithReflectRequires() throws Exception { Path abc = Paths.get("src/test/test-data/dir.manifest.with/out"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base") .requires("auto.by.manifest") @@ -107,7 +107,7 @@ void testManifestWithReflectRequires() throws Exception { } @Test - void testDirDescriptorWithReflectRequires() throws Exception { + void dirDescriptorWithReflectRequires() throws Exception { Path abc = Paths.get("src/test/test-data/dir.descriptor/out"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base") .requires("dir.descriptor") @@ -130,7 +130,7 @@ void testDirDescriptorWithReflectRequires() throws Exception { } @Test - void testJarWithAsmRequires() throws Exception { + void jarWithAsmRequires() throws Exception { Path abc = Paths.get("src/test/test-data/jar.descriptor/asm-6.0_BETA.jar"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base") .requires("org.objectweb.asm") @@ -152,7 +152,7 @@ void testJarWithAsmRequires() throws Exception { } @Test - void testIdenticalModuleNames() throws Exception { + void identicalModuleNames() throws Exception { Path pj1 = Paths.get("src/test/test-data/jar.empty/plexus-java-1.0.0-SNAPSHOT.jar"); Path pj2 = Paths.get("src/test/test-data/jar.empty.2/plexus-java-2.0.0-SNAPSHOT.jar"); JavaModuleDescriptor descriptor = @@ -182,7 +182,7 @@ void testIdenticalModuleNames() throws Exception { } @Test - public void testIdenticalAutomaticModuleNames() throws Exception { + void identicalAutomaticModuleNames() throws Exception { Path pj1 = Paths.get("src/test/test-data/jar.empty/plexus-java-1.0.0-SNAPSHOT.jar"); Path pj2 = Paths.get("src/test/test-data/jar.empty.2/plexus-java-2.0.0-SNAPSHOT.jar"); JavaModuleDescriptor descriptor = @@ -212,7 +212,7 @@ public void testIdenticalAutomaticModuleNames() throws Exception { } @Test - public void testMainJarModuleAndTestJarAutomatic() throws Exception { + void mainJarModuleAndTestJarAutomatic() throws Exception { Path pj1 = Paths.get("src/test/test-data/jar.tests/plexus-java-1.0.0-SNAPSHOT.jar"); Path pj2 = Paths.get("src/test/test-data/jar.tests/plexus-java-1.0.0-SNAPSHOT-tests.jar"); JavaModuleDescriptor descriptor = @@ -242,7 +242,7 @@ public void testMainJarModuleAndTestJarAutomatic() throws Exception { } @Test - void testNonJar() throws Exception { + void nonJar() throws Exception { Path p = Paths.get("src/test/test-data/nonjar/pom.xml"); ResolvePathsRequest request = @@ -254,7 +254,7 @@ void testNonJar() throws Exception { } @Test - void testAdditionalModules() throws Exception { + void additionalModules() throws Exception { Path p = Paths.get("src/test/test-data/mock/jar0.jar"); JavaModuleDescriptor descriptor = JavaModuleDescriptor.newModule("base").build(); @@ -276,7 +276,7 @@ void testAdditionalModules() throws Exception { } @Test - void testResolvePath() throws Exception { + void resolvePath() throws Exception { Path abc = Paths.get("src/test/test-data/mock/jar0.jar"); ResolvePathRequest request = ResolvePathRequest.ofPath(abc); @@ -291,7 +291,7 @@ void testResolvePath() throws Exception { } @Test - void testNoMatchingProviders() throws Exception { + void noMatchingProviders() throws Exception { Path abc = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file ResolvePathsRequest request = @@ -312,7 +312,7 @@ void testNoMatchingProviders() throws Exception { } @Test - void testMainModuleDescriptorWithProviders() throws Exception { + void mainModuleDescriptorWithProviders() throws Exception { Path abc = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file ResolvePathsRequest request = @@ -333,7 +333,7 @@ void testMainModuleDescriptorWithProviders() throws Exception { } @Test - void testMainModuleDescriptorWithProvidersDontIncludeProviders() throws Exception { + void mainModuleDescriptorWithProvidersDontIncludeProviders() throws Exception { Path abc = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file ResolvePathsRequest request = ResolvePathsRequest.ofPaths(def).setMainModuleDescriptor(abc); @@ -353,7 +353,7 @@ void testMainModuleDescriptorWithProvidersDontIncludeProviders() throws Exceptio } @Test - void testTransitiveProviders() throws Exception { + void transitiveProviders() throws Exception { Path abc = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path ghi = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file @@ -379,7 +379,7 @@ void testTransitiveProviders() throws Exception { } @Test - void testDontIncludeProviders() throws Exception { + void dontIncludeProviders() throws Exception { Path abc = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path ghi = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file @@ -404,7 +404,7 @@ void testDontIncludeProviders() throws Exception { } @Test - void testAllowAdditionalModulesWithoutMainDescriptor() throws Exception { + void allowAdditionalModulesWithoutMainDescriptor() throws Exception { Path def = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path ghi = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file ResolvePathsRequest request = @@ -423,7 +423,7 @@ void testAllowAdditionalModulesWithoutMainDescriptor() throws Exception { } @Test - void testReuseModuleDescriptor() throws Exception { + void reuseModuleDescriptor() throws Exception { Path def = Paths.get("src/test/test-data/mock/jar0.jar"); ResolvePathRequest request1 = ResolvePathRequest.ofPath(def); @@ -441,7 +441,7 @@ void testReuseModuleDescriptor() throws Exception { } @Test - void testParseModuleDescriptor() throws Exception { + void parseModuleDescriptor() throws Exception { Path descriptorPath = Paths.get("src/test/test-data/src.dir/module-info.java"); when(qdoxParser.fromSourcePath(descriptorPath)) .thenReturn(JavaModuleDescriptor.newModule("a.b.c").build()); @@ -460,7 +460,7 @@ void testParseModuleDescriptor() throws Exception { } @Test - void testTransitiveStatic() throws Exception { + void transitiveStatic() throws Exception { Path moduleA = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path moduleB = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path moduleC = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file @@ -486,7 +486,7 @@ void testTransitiveStatic() throws Exception { } @Test - void testDirectStatic() throws Exception { + void directStatic() throws Exception { Path moduleA = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path moduleB = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path moduleC = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file @@ -517,7 +517,7 @@ void testDirectStatic() throws Exception { } @Test - void testDuplicateModule() throws Exception { + void duplicateModule() throws Exception { Path moduleA = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path moduleB = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path moduleC = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file @@ -547,7 +547,7 @@ void testDuplicateModule() throws Exception { } @Test - void testStaticTransitive() throws Exception { + void staticTransitive() throws Exception { Path moduleA = Paths.get("src/test/test-data/mock/module-info.java"); // some file called module-info.java Path moduleB = Paths.get("src/test/test-data/mock/jar0.jar"); // any existing file Path moduleC = Paths.get("src/test/test-data/mock/jar1.jar"); // any existing file diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/ManifestModuleNameExtractorTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/ManifestModuleNameExtractorTest.java index e264a47..dead50b 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/ManifestModuleNameExtractorTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/jpms/ManifestModuleNameExtractorTest.java @@ -29,29 +29,29 @@ class ManifestModuleNameExtractorTest { private ManifestModuleNameExtractor extractor = new ManifestModuleNameExtractor(); @Test - void testNoManifestInJar() throws Exception { + void noManifestInJar() throws Exception { assertNull(extractor.extract(Paths.get("src/test/test-data/jar.name/plexus-java-1.0.0-SNAPSHOT.jar"))); } @Test - void testManifestInJar() throws Exception { + void manifestInJar() throws Exception { assertEquals( "org.codehaus.plexus.languages.java", extractor.extract(Paths.get("src/test/test-data/jar.manifest.with/plexus-java-1.0.0-SNAPSHOT.jar"))); } @Test - void testNoManifestInDir() throws Exception { + void noManifestInDir() throws Exception { assertNull(extractor.extract(Paths.get("src/test/test-data/empty/out"))); } @Test - void testEmptyManifestInDir() throws Exception { + void emptyManifestInDir() throws Exception { assertNull(extractor.extract(Paths.get("src/test/test-data/manifest.without/out"))); } @Test - void testManifestInDir() throws Exception { + void manifestInDir() throws Exception { assertEquals("auto.by.manifest", extractor.extract(Paths.get("src/test/test-data/dir.manifest.with/out"))); } } diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaClassVersionTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaClassVersionTest.java index c29b50a..46798ef 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaClassVersionTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaClassVersionTest.java @@ -24,7 +24,7 @@ class JavaClassVersionTest { @ParameterizedTest @MethodSource("provideClassFiles") - void testFilesClassVersions(Path filePath) { + void filesClassVersions(Path filePath) { String fileName = filePath.getFileName().toString(); int javaVersion = Integer.parseInt(fileName.substring(fileName.indexOf("-") + 1, fileName.length() - 6)); JavaClassfileVersion classVersion = JavaClassfileVersion.of(filePath); @@ -47,7 +47,7 @@ static Stream provideClassFiles() { } @Test - void testJavaClassPreview() { + void javaClassPreview() { Path previewFile = Paths.get("src/test/test-data/classfile.version/helloworld-preview.class"); JavaClassfileVersion previewClass = JavaClassfileVersion.of(previewFile); assertTrue(previewClass.isPreview()); @@ -56,7 +56,7 @@ void testJavaClassPreview() { } @Test - void testJavaClassVersionMajor45orAbove() { + void javaClassVersionMajor45orAbove() { assertThrows( IllegalArgumentException.class, () -> new JavaClassfileVersion(44, 0), diff --git a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaVersionTest.java b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaVersionTest.java index 39b4381..a45a132 100644 --- a/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaVersionTest.java +++ b/plexus-java/src/test/java/org/codehaus/plexus/languages/java/version/JavaVersionTest.java @@ -32,7 +32,7 @@ */ class JavaVersionTest { @Test - void testParse() { + void parse() { assertThat(JavaVersion.parse("1.4").compareTo(JavaVersion.parse("1.4.2"))) .isNegative(); assertThat(JavaVersion.parse("1.4").compareTo(JavaVersion.parse("1.5"))).isNegative(); @@ -50,7 +50,7 @@ void testParse() { } @Test - void testVersionNamingExamples() { + void versionNamingExamples() { // All GA (FCS) versions are ordered based on the standard dot-notation. For example: 1.3.0 < 1.3.0_01 < 1.3.1 < // 1.3.1_01. // Source: http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html @@ -67,7 +67,7 @@ void testVersionNamingExamples() { } @Test - void testJEP223Short() { + void jep223Short() { // http://openjdk.java.net/jeps/223 assertThat(JavaVersion.parse("9-ea").compareTo(JavaVersion.parse("9"))).isNegative(); assertThat(JavaVersion.parse("9").compareTo(JavaVersion.parse("9.0.1"))).isNegative(); @@ -84,14 +84,14 @@ void testJEP223Short() { } @Test - void testIsAtLeastString() { + void isAtLeastString() { JavaVersion base = JavaVersion.parse("7"); assertTrue(base.isAtLeast("7")); assertFalse(base.isAtLeast("8")); } @Test - void testIsAtLeastVersion() { + void isAtLeastVersion() { // e.g. can I use the module-path, which is supported since java 9 JavaVersion j9 = JavaVersion.parse("9"); assertFalse(JavaVersion.parse("8").isAtLeast(j9)); @@ -99,14 +99,14 @@ void testIsAtLeastVersion() { } @Test - void testIsBeforeString() { + void isBeforeString() { JavaVersion base = JavaVersion.parse("7"); assertFalse(base.isBefore("7")); assertTrue(base.isBefore("8")); } @Test - void testIsBeforeStringVersion() { + void isBeforeStringVersion() { // e.g. can I use -XX:MaxPermSize, which has been removed in Java 9 JavaVersion j9 = JavaVersion.parse("9"); assertTrue(JavaVersion.parse("8").isBefore(j9)); @@ -114,7 +114,7 @@ void testIsBeforeStringVersion() { } @Test - void testEquals() { + void equals() { JavaVersion seven = JavaVersion.parse("7"); JavaVersion other = JavaVersion.parse("7"); @@ -126,7 +126,7 @@ void testEquals() { } @Test - void testHascode() { + void hascode() { JavaVersion seven = JavaVersion.parse("7"); JavaVersion other = JavaVersion.parse("7"); @@ -141,7 +141,7 @@ void testToString() { } @Test - void testAsMajor() { + void asMajor() { assertEquals(JavaVersion.parse("2"), JavaVersion.parse("1.2").asMajor()); assertEquals(JavaVersion.parse("5.0"), JavaVersion.parse("5.0").asMajor()); // only shift one time @@ -149,13 +149,13 @@ void testAsMajor() { } @Test - void testAsMajorEquals() { + void asMajorEquals() { JavaVersion version = JavaVersion.parse("1.2"); assertEquals(version, version.asMajor()); } @Test - void testValueWithGroups() { + void valueWithGroups() { assertThat(JavaVersion.parse("1").getValue(1)).isEqualTo("1"); assertThat(JavaVersion.parse("1").getValue(2)).isEqualTo("1.0"); assertThat(JavaVersion.parse("1").getValue(3)).isEqualTo("1.0.0");