From f97487c768d759b7d128ec3cb6eb07501698a33f Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Wed, 20 Nov 2024 23:26:15 -0600 Subject: [PATCH] Replace junit assertThrows w/ AssertJ assertThatExceptionOfType Signed-off-by: Chris Bono --- .../grpc/autoconfigure/server/GrpcServerPropertiesTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-grpc-spring-boot-autoconfigure/src/test/java/org/springframework/grpc/autoconfigure/server/GrpcServerPropertiesTests.java b/spring-grpc-spring-boot-autoconfigure/src/test/java/org/springframework/grpc/autoconfigure/server/GrpcServerPropertiesTests.java index 51150dc..7cd4540 100644 --- a/spring-grpc-spring-boot-autoconfigure/src/test/java/org/springframework/grpc/autoconfigure/server/GrpcServerPropertiesTests.java +++ b/spring-grpc-spring-boot-autoconfigure/src/test/java/org/springframework/grpc/autoconfigure/server/GrpcServerPropertiesTests.java @@ -17,7 +17,7 @@ package org.springframework.grpc.autoconfigure.server; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import java.time.Duration; import java.util.HashMap; @@ -173,7 +173,7 @@ class GrpcServerPropertiesTests { Map map = new HashMap<>(); map.put("spring.grpc.server.address", "my-server-ip:3130"); map.put("spring.grpc.server.port", "10000"); - assertThrows(BindException.class, () -> bindProperties(map)); + assertThatExceptionOfType(BindException.class).isThrownBy(() -> bindProperties(map)); } }