From 0b0e3056e2c6b0f5785ee7e72778d13b3962fa43 Mon Sep 17 00:00:00 2001 From: Fury_Phoenix <64714532+Phoenix-Starlight@users.noreply.github.com> Date: Fri, 10 May 2024 07:38:47 -0700 Subject: [PATCH] Refactor to use Micronaut application context --- .../micronaut/spring/boot/starter/EnableMicronautTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot-starter/src/test/java/io/micronaut/spring/boot/starter/EnableMicronautTest.java b/spring-boot-starter/src/test/java/io/micronaut/spring/boot/starter/EnableMicronautTest.java index 4f2dcaa0e..ac6cc1b0b 100644 --- a/spring-boot-starter/src/test/java/io/micronaut/spring/boot/starter/EnableMicronautTest.java +++ b/spring-boot-starter/src/test/java/io/micronaut/spring/boot/starter/EnableMicronautTest.java @@ -55,9 +55,10 @@ void testEnableMicronaut() { assertEquals(3, fooBeanList.size()); assertTrue(context.isRunning()); assertFalse( - Arrays.stream(context.getBeanDefinitionNames()) - .map(context::getType) - .anyMatch(Objects::isNull) + context.getBeanDefinitions() + .stream() + .map(bean -> bean.getBeanType()) + .anyMatch(Objects::isNull) ); } }