Skip to content

Commit

Permalink
Polish "Add Spring Boot 3 to DefaultMavenVersionResolverTests"
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed Jan 7, 2025
1 parent cb55d0b commit dd6a79f
Showing 1 changed file with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ void createResolver(@TempDir Path temp) {

@Test
void resolveDependenciesForSpringBoot() {
Map<String, String> versions = this.resolver.resolveDependencies("org.springframework.boot",
"spring-boot-dependencies", "2.1.5.RELEASE");
assertThat(versions).containsEntry("org.flywaydb:flyway-core", "5.2.4");
}

@Test
void resolveDependenciesForSpringBoot3() {
Map<String, String> versions = this.resolver.resolveDependencies("org.springframework.boot",
"spring-boot-dependencies", "3.4.1");
assertThat(versions).containsEntry("io.micrometer:micrometer-core", "1.14.2")
Expand All @@ -60,21 +53,21 @@ void resolveDependenciesForSpringBoot3() {
@Test
void resolveDependenciesForSpringCloud() {
Map<String, String> versions = this.resolver.resolveDependencies("org.springframework.cloud",
"spring-cloud-dependencies", "Greenwich.SR1");
assertThat(versions).containsEntry("com.netflix.ribbon:ribbon", "2.3.0");
"spring-cloud-dependencies", "2024.0.0");
assertThat(versions).containsEntry("com.netflix.eureka:eureka-client", "2.0.4");
}

@Test
void resolveDependenciesUsingMilestones() {
Map<String, String> versions = this.resolver.resolveDependencies("org.springframework.boot",
"spring-boot-dependencies", "2.2.0.M3");
assertThat(versions).containsEntry("org.flywaydb:flyway-core", "5.2.4");
"spring-boot-dependencies", "3.4.0-M1");
assertThat(versions).containsEntry("org.flywaydb:flyway-core", "10.15.2");
}

@Test
void resolveDependenciesUsingSnapshots() {
Map<String, String> versions = this.resolver.resolveDependencies("org.springframework.boot",
"spring-boot-dependencies", "2.4.0-SNAPSHOT");
"spring-boot-dependencies", "3.4.0-SNAPSHOT");
assertThat(versions).isNotEmpty();
}

Expand All @@ -88,15 +81,15 @@ void resolveDependenciesForNonExistentDependency() {
@Test
void resolvePluginsForSpringBoot() {
Map<String, String> versions = this.resolver.resolvePlugins("org.springframework.boot",
"spring-boot-starter-parent", "3.1.1");
assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.1.1");
"spring-boot-starter-parent", "3.4.1");
assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.4.1");
}

@Test
void resolvePluginsUsingMilestones() {
Map<String, String> versions = this.resolver.resolvePlugins("org.springframework.boot",
"spring-boot-dependencies", "2.2.0.M3");
assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "2.2.0.M3");
"spring-boot-dependencies", "3.4.0-M1");
assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.4.0-M1");
}

@Test
Expand All @@ -109,7 +102,7 @@ void resolvePluginsUsingMilestoneThatHasResolutionProblem() {
@Test
void resolvePluginsUsingSnapshots() {
Map<String, String> versions = this.resolver.resolvePlugins("org.springframework.boot",
"spring-boot-dependencies", "2.4.0-SNAPSHOT");
"spring-boot-dependencies", "3.4.0-SNAPSHOT");
assertThat(versions).isNotEmpty();
}

Expand Down

0 comments on commit dd6a79f

Please sign in to comment.