1818 */
1919package org .eclipse .aether .util .repository ;
2020
21+ import java .util .Collections ;
22+
2123import org .eclipse .aether .repository .RemoteRepository ;
2224import org .eclipse .aether .repository .RepositoryKeyFunction ;
2325import org .eclipse .aether .repository .RepositoryPolicy ;
2426import org .junit .jupiter .api .Test ;
2527
26- import java .util .Arrays ;
27- import java .util .Collections ;
28-
2928import static org .junit .jupiter .api .Assertions .assertEquals ;
3029
3130public class RepositoryIdHelperTest {
@@ -37,11 +36,10 @@ public class RepositoryIdHelperTest {
3736 "central" , "default" , "https://repo1.maven.org/maven2/" )
3837 .setSnapshotPolicy (new RepositoryPolicy (false , null , null ))
3938 .build ();
40- private final RemoteRepository central_trivial = new RemoteRepository .Builder (
41- "central" , "default" , "https://repo1.maven.org/maven2/" )
42- .build ();
39+ private final RemoteRepository central_trivial =
40+ new RemoteRepository .Builder ("central" , "default" , "https://repo1.maven.org/maven2/" ).build ();
4341 private final RemoteRepository central_mirror = new RemoteRepository .Builder (
44- "my-mirror" , "default" , "https://mymrm.com/maven/" )
42+ "my-mirror" , "default" , "https://mymrm.com/maven/" )
4543 .setSnapshotPolicy (new RepositoryPolicy (false , null , null ))
4644 .setMirroredRepositories (Collections .singletonList (central ))
4745 .build ();
@@ -50,13 +48,14 @@ public class RepositoryIdHelperTest {
5048 .setReleasePolicy (new RepositoryPolicy (false , null , null ))
5149 .build ();
5250 private final RemoteRepository file_unfriendly = new RemoteRepository .Builder (
53- "apache/snapshots" , "default" , "https://repository.apache.org/content/repositories/snapshots/" )
51+ "apache/snapshots" , "default" , "https://repository.apache.org/content/repositories/snapshots/" )
5452 .setReleasePolicy (new RepositoryPolicy (false , null , null ))
5553 .build ();
5654
5755 @ Test
5856 void simple () {
59- RepositoryKeyFunction func = RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .SIMPLE .name ());
57+ RepositoryKeyFunction func =
58+ RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .SIMPLE .name ());
6059 assertEquals ("central" , func .apply (central , null ));
6160 assertEquals ("central" , func .apply (central_legacy , null ));
6261 assertEquals ("central" , func .apply (central_trivial , null ));
@@ -67,7 +66,8 @@ void simple() {
6766
6867 @ Test
6968 void nid () {
70- RepositoryKeyFunction func = RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NID .name ());
69+ RepositoryKeyFunction func =
70+ RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NID .name ());
7171 assertEquals ("central" , func .apply (central , null ));
7272 assertEquals ("central" , func .apply (central_legacy , null ));
7373 assertEquals ("central" , func .apply (central_trivial , null ));
@@ -78,23 +78,27 @@ void nid() {
7878
7979 @ Test
8080 void nidHurl () {
81- RepositoryKeyFunction func = RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NID_HURL .name ());
81+ RepositoryKeyFunction func =
82+ RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NID_HURL .name ());
8283 assertEquals ("central-0aeeb43004cebeccad6fdf0fec27084167d5880a" , func .apply (central , null ));
8384 assertEquals ("central-a27bb55260d64d6035671716555d10644054c89d" , func .apply (central_legacy , null ));
8485 assertEquals ("central-a27bb55260d64d6035671716555d10644054c89d" , func .apply (central_trivial , null ));
8586 assertEquals ("my-mirror-eb106d0adc4a56b55067f069a2fed5526fd6cb18" , func .apply (central_mirror , null ));
8687 assertEquals ("apache-snapshots-5c4f89479e3c71fb3c2fbc6213fb00f6371fbb96" , func .apply (asf_snapshots , null ));
87- assertEquals ("apache-SLASH-snapshots-5c4f89479e3c71fb3c2fbc6213fb00f6371fbb96" , func .apply (file_unfriendly , null ));
88+ assertEquals (
89+ "apache-SLASH-snapshots-5c4f89479e3c71fb3c2fbc6213fb00f6371fbb96" , func .apply (file_unfriendly , null ));
8890 }
8991
9092 @ Test
9193 void ngurk () {
92- RepositoryKeyFunction func = RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NGURK .name ());
94+ RepositoryKeyFunction func =
95+ RepositoryIdHelper .getRepositoryKeyFunction (RepositoryIdHelper .RepositoryKeyType .NGURK .name ());
9396 assertEquals ("central-ff5deec948d038ceb880e13e9f61455903b0d0a6" , func .apply (central , null ));
9497 assertEquals ("central-ffb5c2a34e47c429571fc29752730e9ce6e44d79" , func .apply (central_legacy , null ));
9598 assertEquals ("central-acc6c84ca8674036eda6708502b5f02fb09a9731" , func .apply (central_trivial , null ));
9699 assertEquals ("my-mirror-256631324003f5718aca1e80db8377c7f9ecd852" , func .apply (central_mirror , null ));
97100 assertEquals ("apache-snapshots-62375dea6c3c8bebdbae5cca79a4f5ad2eaebf34" , func .apply (asf_snapshots , null ));
98- assertEquals ("apache-SLASH-snapshots-2e126ec79795c077a3c42dc536fa28c13c3bdb0d" , func .apply (file_unfriendly , null ));
101+ assertEquals (
102+ "apache-SLASH-snapshots-2e126ec79795c077a3c42dc536fa28c13c3bdb0d" , func .apply (file_unfriendly , null ));
99103 }
100104}
0 commit comments