Browse Source

Fix typos in tests

Closes gh-35815

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
pull/35817/head
Tran Ngoc Nhan 1 month ago committed by GitHub
parent
commit
18d8d458e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java
  2. 2
      spring-beans/src/test/java/org/springframework/beans/factory/xml/MetadataAttachmentTests.java
  3. 2
      spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanRegistrationAotContributionTests.java
  4. 2
      spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java
  5. 2
      spring-expression/src/test/java/org/springframework/expression/spel/MapTests.java

4
spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java

@ -46,14 +46,14 @@ class YamlMapFactoryBeanTests {
@Test @Test
void testSetIgnoreResourceNotFound() { void testSetIgnoreResourceNotFound() {
this.factory.setResolutionMethod(YamlMapFactoryBean.ResolutionMethod.OVERRIDE_AND_IGNORE); this.factory.setResolutionMethod(YamlMapFactoryBean.ResolutionMethod.OVERRIDE_AND_IGNORE);
this.factory.setResources(new FileSystemResource("non-exsitent-file.yml")); this.factory.setResources(new FileSystemResource("non-existent-file.yml"));
assertThat(this.factory.getObject()).isEmpty(); assertThat(this.factory.getObject()).isEmpty();
} }
@Test @Test
void testSetBarfOnResourceNotFound() { void testSetBarfOnResourceNotFound() {
assertThatIllegalStateException().isThrownBy(() -> { assertThatIllegalStateException().isThrownBy(() -> {
this.factory.setResources(new FileSystemResource("non-exsitent-file.yml")); this.factory.setResources(new FileSystemResource("non-existent-file.yml"));
this.factory.getObject().size(); this.factory.getObject().size();
}); });
} }

2
spring-beans/src/test/java/org/springframework/beans/factory/xml/MetadataAttachmentTests.java

@ -51,7 +51,7 @@ class MetadataAttachmentTests {
void metadataIsInherited() { void metadataIsInherited() {
BeanDefinition beanDefinition = this.beanFactory.getMergedBeanDefinition("testBean2"); BeanDefinition beanDefinition = this.beanFactory.getMergedBeanDefinition("testBean2");
assertThat(beanDefinition.getAttribute("foo")).as("Metadata not inherited").isEqualTo("bar"); assertThat(beanDefinition.getAttribute("foo")).as("Metadata not inherited").isEqualTo("bar");
assertThat(beanDefinition.getAttribute("abc")).as("Child metdata not attached").isEqualTo("123"); assertThat(beanDefinition.getAttribute("abc")).as("Child metadata not attached").isEqualTo("123");
} }
@Test @Test

2
spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanRegistrationAotContributionTests.java

@ -92,7 +92,7 @@ class CommonAnnotationBeanRegistrationAotContributionTests {
@Test @Test
@CompileWithForkedClassLoader @CompileWithForkedClassLoader
void contributeWhenPackagePrivateFieldInjectionInjectsUsingFieldAssignement() { void contributeWhenPackagePrivateFieldInjectionInjectsUsingFieldAssignment() {
this.beanFactory.registerSingleton("one", "1"); this.beanFactory.registerSingleton("one", "1");
this.beanFactory.registerSingleton("two", "2"); this.beanFactory.registerSingleton("two", "2");
RegisteredBean registeredBean = getAndApplyContribution( RegisteredBean registeredBean = getAndApplyContribution(

2
spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java

@ -154,7 +154,7 @@ class InstrumentedMethodTests {
} }
@Test @Test
void classGetConstructorsShouldNotMatchWhemMissingTypeHint() { void classGetConstructorsShouldNotMatchWhenMissingTypeHint() {
assertThatInvocationDoesNotMatch(InstrumentedMethod.CLASS_GETCONSTRUCTORS, this.stringGetConstructors); assertThatInvocationDoesNotMatch(InstrumentedMethod.CLASS_GETCONSTRUCTORS, this.stringGetConstructors);
} }

2
spring-expression/src/test/java/org/springframework/expression/spel/MapTests.java

@ -81,7 +81,7 @@ class MapTests extends AbstractExpressionTests {
} }
@Test @Test
void inelineMapIsInstanceOfMap() { void inlineMapIsInstanceOfMap() {
evaluate("{a:1, b:2} instanceof T(java.util.Map)", "true", Boolean.class); evaluate("{a:1, b:2} instanceof T(java.util.Map)", "true", Boolean.class);
} }

Loading…
Cancel
Save