Skip to content

Commit

Permalink
Update BeanRegistrarTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Jan 7, 2025
1 parent fc1117b commit 0342c2a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

Expand All @@ -35,6 +36,7 @@
import static io.microsphere.spring.beans.factory.support.BeanRegistrar.registerFactoryBean;
import static io.microsphere.spring.beans.factory.support.BeanRegistrar.registerInfrastructureBean;
import static io.microsphere.spring.beans.factory.support.BeanRegistrar.registerSingleton;
import static io.microsphere.spring.beans.factory.support.BeanRegistrar.registerSpringFactoriesBeans;
import static java.beans.Introspector.decapitalize;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -94,7 +96,7 @@ public void testHasAlias() {

@Test
public void testRegisterSpringFactoriesBeans() {
int beansCount = registerSpringFactoriesBeans(this.beanFactory, Bean.class);
int beansCount = registerSpringFactoriesBeans((BeanFactory) this.beanFactory, Bean.class);
assertEquals(2, beansCount);
assertTrue(this.beanFactory.containsBean(decapitalize(TestBean.class.getSimpleName())));
assertTrue(this.beanFactory.containsBean(decapitalize(TestBean2.class.getSimpleName())));
Expand Down

0 comments on commit 0342c2a

Please sign in to comment.