Skip to content

Commit 24e3916

Browse files
1 parent bbc107a commit 24e3916

File tree

7 files changed

+30
-32
lines changed

7 files changed

+30
-32
lines changed

mrm-api/src/test/java/org/codehaus/mojo/mrm/api/AbstractEntryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AbstractEntryTest {
1010

1111
// MMOCKRM-13
1212
@Test
13-
void testPathForRootEntry() {
13+
void pathForRootEntry() {
1414
FileSystem fileSystem = mock(FileSystem.class);
1515
DefaultDirectoryEntry entry = new DefaultDirectoryEntry(fileSystem, null, "/favicon.ico");
1616

mrm-api/src/test/java/org/codehaus/mojo/mrm/api/maven/ArtifactTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class ArtifactTest {
2323

2424
@Test
25-
void testSmokes() throws Exception {
25+
void smokes() throws Exception {
2626
assertEquals(new Artifact("foo", "bar", "1.0", "jar"), new Artifact("foo", "bar", "1.0", null, "jar"));
2727
}
2828
}

mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/ArchetypeCatalogFileEntryTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
class ArchetypeCatalogFileEntryTest {
1717

1818
@Test
19-
void testCleanArchetypeCatalogFileEntry() throws Exception {
19+
void cleanArchetypeCatalogFileEntry() throws Exception {
2020
ArchetypeCatalogFileEntry entry = new ArchetypeCatalogFileEntry(null, null, null);
2121
assertNull(entry.getFileSystem());
2222
assertNull(entry.getParent());
2323
assertEquals("archetype-catalog.xml", entry.getName());
2424
}
2525

2626
@Test
27-
void testFileSystem() throws Exception {
27+
void fileSystem() throws Exception {
2828
FileSystem fileSystem = mock(FileSystem.class);
2929
DirectoryEntry root = mock(DirectoryEntry.class);
3030
when(fileSystem.getRoot()).thenReturn(root);
@@ -36,7 +36,7 @@ void testFileSystem() throws Exception {
3636
}
3737

3838
@Test
39-
void testParent() throws Exception {
39+
void parent() throws Exception {
4040
FileSystem fileSystem = mock(FileSystem.class);
4141
DirectoryEntry parent = mock(DirectoryEntry.class);
4242
when(fileSystem.getRoot()).thenReturn(parent);
@@ -48,7 +48,7 @@ void testParent() throws Exception {
4848
}
4949

5050
@Test
51-
void testArtifactStore() throws Exception {
51+
void artifactStore() throws Exception {
5252
final long lastModified = System.currentTimeMillis();
5353
FileSystem fileSystem = mock(FileSystem.class);
5454
DirectoryEntry parent = mock(DirectoryEntry.class);

mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystemTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
class ArtifactStoreFileSystemTest {
3939

4040
@Test
41-
void testGroupMetadataRegex() {
41+
void groupMetadataRegex() {
4242
Matcher matcher = ArtifactStoreFileSystem.METADATA.matcher("/commons/maven-metadata.xml");
4343
assertTrue(matcher.matches());
4444
assertEquals("commons/", matcher.group(1));
@@ -52,7 +52,7 @@ void testGroupMetadataRegex() {
5252
}
5353

5454
@Test
55-
void testArtifactRegex() {
55+
void artifactRegex() {
5656
Matcher matcher = ArtifactStoreFileSystem.ARTIFACT.matcher("/commons/maven-metadata.xml");
5757
assertFalse(matcher.matches());
5858
matcher = ArtifactStoreFileSystem.ARTIFACT.matcher("/org/apache/maven/maven-metadata.xml");
@@ -103,7 +103,7 @@ void testArtifactRegex() {
103103
}
104104

105105
@Test
106-
void testSnapshotArtifactRegex() {
106+
void snapshotArtifactRegex() {
107107
Matcher matcher = ArtifactStoreFileSystem.SNAPSHOT_ARTIFACT.matcher("/commons/maven-metadata.xml");
108108
assertFalse(matcher.matches());
109109
matcher = ArtifactStoreFileSystem.SNAPSHOT_ARTIFACT.matcher("/org/apache/maven/maven-metadata.xml");
@@ -148,7 +148,7 @@ void testSnapshotArtifactRegex() {
148148

149149
// MMOCKRM-5
150150
@Test
151-
void testSiteXmlReleaseVersion() throws Exception {
151+
void siteXmlReleaseVersion() throws Exception {
152152
ArtifactStore store = mock(ArtifactStore.class);
153153
when(store.getSize(isA(Artifact.class))).thenThrow(ArtifactNotFoundException.class);
154154
ArtifactStoreFileSystem system = new ArtifactStoreFileSystem(store);
@@ -157,7 +157,7 @@ void testSiteXmlReleaseVersion() throws Exception {
157157
}
158158

159159
@Test
160-
void testSiteXmlSnapshotVersion() throws Exception {
160+
void siteXmlSnapshotVersion() throws Exception {
161161
ArtifactStore store = mock(ArtifactStore.class);
162162
when(store.getSize(isA(Artifact.class))).thenThrow(ArtifactNotFoundException.class);
163163
ArtifactStoreFileSystem system = new ArtifactStoreFileSystem(store);
@@ -167,7 +167,7 @@ void testSiteXmlSnapshotVersion() throws Exception {
167167
}
168168

169169
@Test
170-
void testArchetypeCatalogNotFound() throws Exception {
170+
void archetypeCatalogNotFound() throws Exception {
171171
ArtifactStore store = mock(ArtifactStore.class);
172172
when(store.getArchetypeCatalogLastModified()).thenThrow(ArchetypeCatalogNotFoundException.class);
173173
ArtifactStoreFileSystem system = new ArtifactStoreFileSystem(store);
@@ -176,7 +176,7 @@ void testArchetypeCatalogNotFound() throws Exception {
176176
}
177177

178178
@Test
179-
void testArchetypeCatalog() throws Exception {
179+
void archetypeCatalog() throws Exception {
180180
ArtifactStore store = mock(ArtifactStore.class);
181181
when(store.getArchetypeCatalog()).thenReturn(new ArchetypeCatalog());
182182
ArtifactStoreFileSystem system = new ArtifactStoreFileSystem(store);

mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/CompositeArtifactStoreTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.codehaus.mojo.mrm.impl.maven;
22

3-
import java.io.IOException;
43
import java.util.Collections;
54

65
import org.apache.maven.archetype.catalog.ArchetypeCatalog;
@@ -9,7 +8,6 @@
98
import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
109
import org.apache.maven.artifact.repository.metadata.Versioning;
1110
import org.codehaus.mojo.mrm.api.maven.ArtifactStore;
12-
import org.codehaus.mojo.mrm.api.maven.MetadataNotFoundException;
1311
import org.junit.jupiter.api.Test;
1412

1513
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -20,7 +18,7 @@
2018
class CompositeArtifactStoreTest {
2119

2220
@Test
23-
void testGetArchetypeCatalog() throws Exception {
21+
void getArchetypeCatalog() throws Exception {
2422
ArtifactStore store = mock(ArtifactStore.class);
2523
when(store.getArchetypeCatalog()).thenReturn(new ArchetypeCatalog());
2624
ArtifactStore[] stores = new ArtifactStore[] {store};
@@ -32,7 +30,7 @@ void testGetArchetypeCatalog() throws Exception {
3230
}
3331

3432
@Test
35-
void metadataForSnapshotShouldBeMerged() throws MetadataNotFoundException, IOException {
33+
void metadataForSnapshotShouldBeMerged() throws Exception {
3634

3735
Metadata metadata1 = new Metadata();
3836
metadata1.setArtifactId("artifactId");

mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/DiskArtifactStoreTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DiskArtifactStoreTest extends AbstractTestSupport {
1717

1818
// MMOCKRM-10
1919
@Test
20-
void testArchetypeCatalog() throws Exception {
20+
void archetypeCatalog() throws Exception {
2121
DiskArtifactStore artifactStore = new DiskArtifactStore(getResourceAsFile("/mmockrm-10"));
2222
ArchetypeCatalog catalog = artifactStore.getArchetypeCatalog();
2323
assertNotNull(catalog);
@@ -56,7 +56,7 @@ void sizeShouldBeGreaterThanZeroForSnapshotTimeStamped() throws Exception {
5656
}
5757

5858
@Test
59-
void testSha1Checksum() throws Exception {
59+
void sha1Checksum() throws Exception {
6060
DiskArtifactStore artifactStore = new DiskArtifactStore(getResourceAsFile("/local-repo-unit"));
6161

6262
String sha1Checksum1 = artifactStore.getSha1Checksum(new Artifact("org.group1", "artifact1", "1.0.0", "pom"));
@@ -67,7 +67,7 @@ void testSha1Checksum() throws Exception {
6767
}
6868

6969
@Test
70-
void testArtifactNotFound() throws Exception {
70+
void artifactNotFound() throws Exception {
7171
DiskArtifactStore artifactStore = new DiskArtifactStore(getResourceAsFile("/local-repo-unit"));
7272

7373
Artifact artifact = new Artifact("org.groupXXXX", "artifactXXX", "1.0.0", "pom");

mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/MockArtifactStoreTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ class MockArtifactStoreTest extends AbstractTestSupport {
5050

5151
// MMOCKRM-3
5252
@Test
53-
void testInheritGavFromParent() throws Exception {
53+
void inheritGavFromParent() throws Exception {
5454
// don't fail
5555
MockArtifactStore mockArtifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mmockrm-3"));
5656
assertEquals(2, mockArtifactStore.getArtifactIds("localhost").size());
5757
}
5858

5959
// MMOCKRM-6
6060
@Test
61-
void testClassifiers() throws Exception {
61+
void classifiers() throws Exception {
6262
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mmockrm-7"));
6363

6464
Artifact pomArtifact = new Artifact("localhost", "mmockrm-7", "1.0", "pom");
@@ -76,7 +76,7 @@ void testClassifiers() throws Exception {
7676

7777
// MMOCKRM-10
7878
@Test
79-
void testArchetypeCatalog() throws Exception {
79+
void archetypeCatalog() throws Exception {
8080
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mmockrm-10"));
8181
ArchetypeCatalog catalog = artifactStore.getArchetypeCatalog();
8282
assertNotNull(catalog);
@@ -90,7 +90,7 @@ void testArchetypeCatalog() throws Exception {
9090
}
9191

9292
@Test
93-
void testDirectoryContent() throws Exception {
93+
void directoryContent() throws Exception {
9494
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mrm-15"));
9595

9696
Artifact pomArtifact = new Artifact("localhost", "mrm-15", "1.0", "pom");
@@ -123,7 +123,7 @@ void testDirectoryContent() throws Exception {
123123
}
124124

125125
@Test
126-
void testEmptyJarContent() throws Exception {
126+
void emptyJarContent() throws Exception {
127127
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/empty-jar"));
128128

129129
Artifact pomArtifact = new Artifact("localhost", "mrm-empty-jar", "1.0", "pom");
@@ -155,7 +155,7 @@ void testEmptyJarContent() throws Exception {
155155
}
156156

157157
@Test
158-
void testEmptyPluginJarContent() throws Exception {
158+
void emptyPluginJarContent() throws Exception {
159159
MockArtifactStore artifactStore =
160160
new MockArtifactStore(archiverManager, getResourceAsFile("/empty-plugin-jar"));
161161

@@ -189,7 +189,7 @@ void testEmptyPluginJarContent() throws Exception {
189189
}
190190

191191
@Test
192-
void testDirectoryContentWithTgzArchiver() throws Exception {
192+
void directoryContentWithTgzArchiver() throws Exception {
193193
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/tgz-archiver"));
194194
assertNotNull(artifactStore);
195195

@@ -290,7 +290,7 @@ void testsnapshotartifctswithtimestampPlugin() throws Exception {
290290
}
291291

292292
@Test
293-
void testLastModifiedWithTimestampSnapshot() throws Exception {
293+
void lastModifiedWithTimestampSnapshot() throws Exception {
294294
MockArtifactStore artifactStore =
295295
new MockArtifactStore(archiverManager, getResourceAsFile("/timestamp-snapshot"));
296296
assertNotNull(artifactStore);
@@ -331,7 +331,7 @@ void testLastModifiedWithTimestampSnapshot() throws Exception {
331331
}
332332

333333
@Test
334-
void testLastModifiedWithTimestampSnapshotMetadata() throws Exception {
334+
void lastModifiedWithTimestampSnapshotMetadata() throws Exception {
335335
MockArtifactStore artifactStore =
336336
new MockArtifactStore(archiverManager, getResourceAsFile("/timestamp-snapshot"));
337337
assertNotNull(artifactStore);
@@ -361,15 +361,15 @@ void testLastModifiedWithTimestampSnapshotMetadata() throws Exception {
361361
}
362362

363363
@Test
364-
void testDirectoryContentWithUnknownArchiver() throws Exception {
364+
void directoryContentWithUnknownArchiver() throws Exception {
365365
IllegalStateException exception = assertThrowsExactly(
366366
IllegalStateException.class,
367367
() -> new MockArtifactStore(archiverManager, getResourceAsFile("/unknown-archiver")));
368368
assertTrue(exception.getMessage().contains("Could not find archiver for directory"));
369369
}
370370

371371
@Test
372-
void testDirectoryWithClassifierContent() throws Exception {
372+
void directoryWithClassifierContent() throws Exception {
373373
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mrm-xx"));
374374

375375
Artifact pomArtifact = new Artifact("localhost", "mrm-xx", "1.0", "pom");
@@ -383,7 +383,7 @@ void testDirectoryWithClassifierContent() throws Exception {
383383
}
384384

385385
@Test
386-
void testSha1Checksum() throws Exception {
386+
void sha1Checksum() throws Exception {
387387
MockArtifactStore artifactStore = new MockArtifactStore(archiverManager, getResourceAsFile("/mrm-15"));
388388

389389
Artifact pomArtifact = new Artifact("localhost", "mrm-15", "1.0", "pom");

0 commit comments

Comments
 (0)