Skip to content

Commit

Permalink
Upgrade to AssertJ 3.25.1, use AssertJ BOM
Browse files Browse the repository at this point in the history
Closes gh-31945
  • Loading branch information
scordio authored and sbrannen committed Jan 4, 2024
1 parent 19a87e9 commit be9ee91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion framework-platform/framework-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
api(platform("io.rsocket:rsocket-bom:1.1.3"))
api(platform("org.apache.groovy:groovy-bom:4.0.17"))
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
api(platform("org.assertj:assertj-bom:3.25.1"))
api(platform("org.eclipse.jetty:jetty-bom:12.0.5"))
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.3"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3"))
Expand Down Expand Up @@ -109,7 +110,6 @@ dependencies {
api("org.aspectj:aspectjrt:1.9.21")
api("org.aspectj:aspectjtools:1.9.21")
api("org.aspectj:aspectjweaver:1.9.21")
api("org.assertj:assertj-core:3.25.0")
api("org.awaitility:awaitility:4.2.0")
api("org.bouncycastle:bcpkix-jdk18on:1.72")
api("org.codehaus.jettison:jettison:1.5.4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ void flattenedMapIsSameAsPropertiesButOrdered() {
void standardTypesSupportedByDefault() {
setYaml("value: !!set\n ? first\n ? second");
this.processor.process((properties, map) -> {
// Assert on Properties as a Map due to bug in AssertJ 3.25.0
Map<Object, Object> propsAsMap = new LinkedHashMap<>(properties);
assertThat(propsAsMap).containsExactly(entry("value[0]", "first"), entry("value[1]", "second"));
assertThat(properties).containsExactly(entry("value[0]", "first"), entry("value[1]", "second"));
assertThat(map.get("value")).asInstanceOf(InstanceOfAssertFactories.type(Set.class))
.satisfies(set -> assertThat(set).containsExactly("first", "second"));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.lang.reflect.Method;

import org.assertj.core.api.ThrowableAssert.ThrowingCallableWithValue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -64,7 +63,7 @@ void buildValidStaticInvocation() {

@Test
void staticInvocationShouldThrowWhenGetInstance() {
assertThatThrownBy((ThrowingCallableWithValue) staticInvocation::getInstance).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(staticInvocation::getInstance).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(staticInvocation::getInstanceTypeReference).isInstanceOf(IllegalStateException.class);
}

Expand Down

0 comments on commit be9ee91

Please sign in to comment.