From bcee6b9da413c3ea02de9358d0272be7fb810fb2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 11 Mar 2020 14:55:39 +0100 Subject: [PATCH] Consistent assertions for supplier-based bean definition tests --- .../annotation/AnnotationConfigApplicationContextTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java index d544438c76..f2a7c86b40 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -336,6 +336,8 @@ class AnnotationConfigApplicationContextTests { assertThat(context.getType("fb")).isEqualTo(String.class); assertThat(context.getType("&fb")).isEqualTo(NonInstantiatedFactoryBean.class); + assertThat(context.getBeanNamesForType(FactoryBean.class)).hasSize(1); + assertThat(context.getBeanNamesForType(NonInstantiatedFactoryBean.class)).hasSize(1); } @Test