|
|
@ -56,7 +56,7 @@ class AnnotationConfigApplicationContextTests { |
|
|
|
context.getBean(uncapitalize(ComponentForScanning.class.getSimpleName())); |
|
|
|
context.getBean(uncapitalize(ComponentForScanning.class.getSimpleName())); |
|
|
|
context.getBean(uncapitalize(Jsr330NamedForScanning.class.getSimpleName())); |
|
|
|
context.getBean(uncapitalize(Jsr330NamedForScanning.class.getSimpleName())); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
assertThat(beans).size().isEqualTo(1); |
|
|
|
assertThat(beans).hasSize(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -68,7 +68,7 @@ class AnnotationConfigApplicationContextTests { |
|
|
|
context.getBean("testBean"); |
|
|
|
context.getBean("testBean"); |
|
|
|
context.getBean("name"); |
|
|
|
context.getBean("name"); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
assertThat(beans).size().isEqualTo(2); |
|
|
|
assertThat(beans).hasSize(2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -80,7 +80,7 @@ class AnnotationConfigApplicationContextTests { |
|
|
|
context.getBean("testBean"); |
|
|
|
context.getBean("testBean"); |
|
|
|
context.getBean("name"); |
|
|
|
context.getBean("name"); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
Map<String, Object> beans = context.getBeansWithAnnotation(Configuration.class); |
|
|
|
assertThat(beans).size().isEqualTo(2); |
|
|
|
assertThat(beans).hasSize(2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|