Polishing

This commit is contained in:
Sam Brannen
2023-11-30 19:04:59 +01:00
parent 8ff687b68c
commit 6ea9fdbf77
36 changed files with 126 additions and 120 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}

View File

@@ -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