From 11672b9bcd867b47cb0170bc969a447aa2a91b39 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 9 Jul 2024 13:04:38 +0100 Subject: [PATCH] Upgrade to AssertJ 3.26.0 Closes gh-41401 --- gradle.properties | 2 +- .../properties/PropertyMapperTests.java | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gradle.properties b/gradle.properties index 30197ac1fda..a442a5e637c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.caching=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 -assertjVersion=3.25.3 +assertjVersion=3.26.0 commonsCodecVersion=1.16.1 graalVersion=22.3 hamcrestVersion=2.2 diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/PropertyMapperTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/PropertyMapperTests.java index a6a5f4547f6..b706cadcc97 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/PropertyMapperTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/PropertyMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ class PropertyMapperTests { @Test void fromValueAlwaysApplyingWhenNonNullShouldAlwaysApplyNonNullToSource() { - this.map.alwaysApplyingWhenNonNull().from((String) null).toCall(() -> fail(null)); + this.map.alwaysApplyingWhenNonNull().from((String) null).toCall(() -> fail()); } @Test @@ -101,14 +101,14 @@ class PropertyMapperTests { @Test void whenNonNullWhenSuppliedNullShouldNotMap() { - this.map.from(() -> null).whenNonNull().as(String::valueOf).toCall(() -> fail(null)); + this.map.from(() -> null).whenNonNull().as(String::valueOf).toCall(() -> fail()); } @Test void whenNonNullWhenSuppliedThrowsNullPointerExceptionShouldNotMap() { this.map.from(() -> { throw new NullPointerException(); - }).whenNonNull().as(String::valueOf).toCall(() -> fail(null)); + }).whenNonNull().as(String::valueOf).toCall(() -> fail()); } @Test @@ -119,7 +119,7 @@ class PropertyMapperTests { @Test void whenTrueWhenValueIsFalseShouldNotMap() { - this.map.from(false).whenTrue().toCall(() -> fail(null)); + this.map.from(false).whenTrue().toCall(() -> fail()); } @Test @@ -130,17 +130,17 @@ class PropertyMapperTests { @Test void whenFalseWhenValueIsTrueShouldNotMap() { - this.map.from(true).whenFalse().toCall(() -> fail(null)); + this.map.from(true).whenFalse().toCall(() -> fail()); } @Test void whenHasTextWhenValueIsNullShouldNotMap() { - this.map.from(() -> null).whenHasText().toCall(() -> fail(null)); + this.map.from(() -> null).whenHasText().toCall(() -> fail()); } @Test void whenHasTextWhenValueIsEmptyShouldNotMap() { - this.map.from("").whenHasText().toCall(() -> fail(null)); + this.map.from("").whenHasText().toCall(() -> fail()); } @Test @@ -157,7 +157,7 @@ class PropertyMapperTests { @Test void whenEqualToWhenValueIsNotEqualShouldNotMatch() { - this.map.from("123").whenEqualTo("321").toCall(() -> fail(null)); + this.map.from("123").whenEqualTo("321").toCall(() -> fail()); } @Test @@ -169,7 +169,7 @@ class PropertyMapperTests { @Test void whenInstanceOfWhenValueIsNotTargetTypeShouldNotMatch() { Supplier supplier = () -> 123L; - this.map.from(supplier).whenInstanceOf(Double.class).toCall(() -> fail(null)); + this.map.from(supplier).whenInstanceOf(Double.class).toCall(() -> fail()); } @Test @@ -180,7 +180,7 @@ class PropertyMapperTests { @Test void whenWhenValueDoesNotMatchShouldNotMap() { - this.map.from("123").when("321"::equals).toCall(() -> fail(null)); + this.map.from("123").when("321"::equals).toCall(() -> fail()); } @Test @@ -198,12 +198,12 @@ class PropertyMapperTests { @Test void alwaysApplyingWhenNonNullShouldAlwaysApplyNonNullToSource() { - this.map.alwaysApplyingWhenNonNull().from(() -> null).toCall(() -> fail(null)); + this.map.alwaysApplyingWhenNonNull().from(() -> null).toCall(() -> fail()); } @Test void whenWhenValueNotMatchesShouldSupportChainedCalls() { - this.map.from("123").when("456"::equals).when("123"::equals).toCall(() -> fail(null)); + this.map.from("123").when("456"::equals).when("123"::equals).toCall(() -> fail()); } @Test