Polishing
This commit is contained in:
@@ -842,7 +842,7 @@ class XmlBeanFactoryTests {
|
||||
|
||||
DependenciesBean rod5 = (DependenciesBean) xbf.getBean("rod5");
|
||||
// Should not have been autowired
|
||||
assertThat((Object) rod5.getSpouse()).isNull();
|
||||
assertThat(rod5.getSpouse()).isNull();
|
||||
|
||||
BeanFactory appCtx = (BeanFactory) xbf.getBean("childAppCtx");
|
||||
assertThat(appCtx.containsBean("rod1")).isTrue();
|
||||
@@ -944,7 +944,7 @@ class XmlBeanFactoryTests {
|
||||
catch (BeanCreationException ex) {
|
||||
ex.printStackTrace();
|
||||
assertThat(ex.toString()).contains("touchy");
|
||||
assertThat((Object) ex.getRelatedCauses()).isNull();
|
||||
assertThat(ex.getRelatedCauses()).isNull();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCache;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -51,7 +50,7 @@ public class ReactiveCachingTests {
|
||||
LateCacheHitDeterminationConfig.class,
|
||||
LateCacheHitDeterminationWithValueWrapperConfig.class})
|
||||
void cacheHitDetermination(Class<?> configClass) {
|
||||
ApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
|
||||
ReactiveCacheableService service = ctx.getBean(ReactiveCacheableService.class);
|
||||
|
||||
Object key = new Object();
|
||||
@@ -107,6 +106,8 @@ public class ReactiveCachingTests {
|
||||
|
||||
assertThat(r1).isNotNull();
|
||||
assertThat(r1).isSameAs(r2).isSameAs(r3);
|
||||
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -187,10 +187,10 @@ class AutowiredConfigurationTests {
|
||||
System.clearProperty("myProp");
|
||||
|
||||
TestBean testBean = context.getBean("testBean", TestBean.class);
|
||||
assertThat((Object) testBean.getName()).isNull();
|
||||
assertThat(testBean.getName()).isNull();
|
||||
|
||||
testBean = context.getBean("testBean2", TestBean.class);
|
||||
assertThat((Object) testBean.getName()).isNull();
|
||||
assertThat(testBean.getName()).isNull();
|
||||
|
||||
System.setProperty("myProp", "foo");
|
||||
|
||||
@@ -203,10 +203,10 @@ class AutowiredConfigurationTests {
|
||||
System.clearProperty("myProp");
|
||||
|
||||
testBean = context.getBean("testBean", TestBean.class);
|
||||
assertThat((Object) testBean.getName()).isNull();
|
||||
assertThat(testBean.getName()).isNull();
|
||||
|
||||
testBean = context.getBean("testBean2", TestBean.class);
|
||||
assertThat((Object) testBean.getName()).isNull();
|
||||
assertThat(testBean.getName()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user