Skip to content

Commit

Permalink
Code formatting improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisJehan committed Aug 29, 2024
1 parent 89a77a3 commit 334e2c4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ final class ArtifactAvailableVersionsTest {
@Test
void testConstructorImmutable() {
final var availableVersions = new ArrayList<>(AVAILABLE_VERSIONS);
final var artifactAvailableVersions = new ArtifactAvailableVersions(ARTIFACT, availableVersions);
availableVersions.clear();
assertThat(artifactAvailableVersions.getAvailableVersions()).isEqualTo(AVAILABLE_VERSIONS);
assertThat(new ArtifactAvailableVersions(ARTIFACT, availableVersions))
.satisfies(immutableArtifactAvailableVersions -> {
availableVersions.clear();
assertThat(immutableArtifactAvailableVersions.getAvailableVersions()).isEqualTo(AVAILABLE_VERSIONS);
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ final class BuildTest {
void testConstructorImmutable() {
final var repositories = new ArrayList<>(REPOSITORIES);
final var artifacts = new ArrayList<>(ARTIFACTS);
final var build = new Build(FILE, repositories, artifacts);
repositories.clear();
artifacts.clear();
assertThat(build.getRepositories()).isEqualTo(REPOSITORIES);
assertThat(build.getArtifacts()).isEqualTo(ARTIFACTS);
assertThat(new Build(FILE, repositories, artifacts)).satisfies(immutableBuild -> {
repositories.clear();
artifacts.clear();
assertThat(immutableBuild.getRepositories()).isEqualTo(REPOSITORIES);
assertThat(immutableBuild.getArtifacts()).isEqualTo(ARTIFACTS);
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ final class DecryptedSettingsTest {
void testConstructorImmutable() {
final var proxies = new ArrayList<>(PROXIES);
final var servers = new ArrayList<>(SERVERS);
final var decryptedSettings = new DecryptedSettings(proxies, servers);
proxies.clear();
servers.clear();
assertThat(decryptedSettings.getProxies()).isEqualTo(PROXIES);
assertThat(decryptedSettings.getServers()).isEqualTo(SERVERS);
assertThat(new DecryptedSettings(proxies, servers)).satisfies(immutableDecryptedSettings -> {
proxies.clear();
servers.clear();
assertThat(immutableDecryptedSettings.getProxies()).isEqualTo(PROXIES);
assertThat(immutableDecryptedSettings.getServers()).isEqualTo(SERVERS);
});
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/.mvnchk-ignore_bom
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# comment
# comment
2 changes: 1 addition & 1 deletion src/test/resources/.mvnchk-ignore_foo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# comment
# comment
foo-group-id:foo-artifact-id
foo-group-id:foo-artifact-id:foo-version
foo-group-id:foo-artifact-id:FOO-VERSION
Expand Down

0 comments on commit 334e2c4

Please sign in to comment.