Polishing
This commit is contained in:
@@ -76,11 +76,13 @@ class GenericApplicationContextTests {
|
||||
|
||||
private final GenericApplicationContext context = new GenericApplicationContext();
|
||||
|
||||
|
||||
@AfterEach
|
||||
void closeContext() {
|
||||
context.close();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void getBeanForClass() {
|
||||
context.registerBeanDefinition("testBean", new RootBeanDefinition(String.class));
|
||||
@@ -91,7 +93,7 @@ class GenericApplicationContextTests {
|
||||
assertThat(context.getBean(CharSequence.class)).isSameAs(context.getBean("testBean"));
|
||||
|
||||
assertThatExceptionOfType(NoUniqueBeanDefinitionException.class)
|
||||
.isThrownBy(() -> context.getBean(Object.class));
|
||||
.isThrownBy(() -> context.getBean(Object.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -509,6 +511,7 @@ class GenericApplicationContextTests {
|
||||
context.close();
|
||||
}
|
||||
|
||||
|
||||
private MergedBeanDefinitionPostProcessor registerMockMergedBeanDefinitionPostProcessor(GenericApplicationContext context) {
|
||||
MergedBeanDefinitionPostProcessor bpp = mock();
|
||||
context.registerBeanDefinition("bpp", BeanDefinitionBuilder.rootBeanDefinition(
|
||||
@@ -563,9 +566,9 @@ class GenericApplicationContextTests {
|
||||
public void setCounter(Integer counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static class TestAotFactoryBean<T> extends AbstractFactoryBean<T> {
|
||||
|
||||
TestAotFactoryBean() {
|
||||
@@ -584,6 +587,7 @@ class GenericApplicationContextTests {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static class PingPongProtocolResolver implements ProtocolResolver {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user