Merge branch '5.3.x'
This commit is contained in:
commit
0fb9de5d0e
|
@ -280,7 +280,7 @@ class BeanUtilsTests {
|
|||
* {@code Number} can NOT be copied to {@code Integer}.
|
||||
*/
|
||||
@Test
|
||||
void copyPropertiesDoesNotCopyeFromSuperTypeToSubType() {
|
||||
void copyPropertiesDoesNotCopyFromSuperTypeToSubType() {
|
||||
NumberHolder numberHolder = new NumberHolder();
|
||||
numberHolder.setNumber(Integer.valueOf(42));
|
||||
IntegerHolder integerHolder = new IntegerHolder();
|
||||
|
|
|
@ -75,7 +75,7 @@ public class ParserStrategyUtilsTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void instantiateClassWhenHasSingleContructorInjectsParams() {
|
||||
public void instantiateClassWhenHasSingleConstructorInjectsParams() {
|
||||
ArgsConstructor instance = instantiateClass(ArgsConstructor.class);
|
||||
assertThat(instance.environment).isSameAs(this.environment);
|
||||
assertThat(instance.beanFactory).isSameAs(this.registry);
|
||||
|
@ -84,7 +84,7 @@ public class ParserStrategyUtilsTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void instantiateClassWhenHasSingleContructorAndAwareInjectsParamsAndCallsAware() {
|
||||
public void instantiateClassWhenHasSingleConstructorAndAwareInjectsParamsAndCallsAware() {
|
||||
ArgsConstructorAndAware instance = instantiateClass(ArgsConstructorAndAware.class);
|
||||
assertThat(instance.environment).isSameAs(this.environment);
|
||||
assertThat(instance.setEnvironment).isSameAs(this.environment);
|
||||
|
@ -104,7 +104,7 @@ public class ParserStrategyUtilsTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void instantiateClassWhenHasMutlipleConstructorsAndNotDefaultThrowsException() {
|
||||
public void instantiateClassWhenHasMultipleConstructorsAndNotDefaultThrowsException() {
|
||||
assertThatExceptionOfType(BeanInstantiationException.class).isThrownBy(() ->
|
||||
instantiateClass(MultipleConstructorsWithNoDefault.class));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Phillip Webb
|
||||
* @since 5.2
|
||||
*/
|
||||
class AnnotationBackCompatibiltyTests {
|
||||
class AnnotationBackCompatibilityTests {
|
||||
|
||||
@Test
|
||||
void multiplRoutesToMetaAnnotation() {
|
|
@ -123,7 +123,7 @@ class AnnotationsScannerTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncudesOnlyOne() {
|
||||
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncludesOnlyOne() {
|
||||
Class<?> source = WithSingleSuperclassAndDoubleInherited.class;
|
||||
assertThat(Arrays.stream(source.getAnnotations()).map(
|
||||
Annotation::annotationType).map(Class::getName)).containsExactly(
|
||||
|
|
|
@ -239,7 +239,7 @@ public class StandardEnvironmentTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void getActiveProfiles_fromSystemProperties_withMulitpleProfiles_withWhitespace() {
|
||||
void getActiveProfiles_fromSystemProperties_withMultipleProfiles_withWhitespace() {
|
||||
System.setProperty(ACTIVE_PROFILES_PROPERTY_NAME, " bar , baz "); // notice whitespace
|
||||
assertThat(environment.getActiveProfiles()).contains("bar", "baz");
|
||||
System.clearProperty(ACTIVE_PROFILES_PROPERTY_NAME);
|
||||
|
|
|
@ -139,13 +139,13 @@ public class SetValueTests extends AbstractExpressionTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetGenericListElementValueTypeCoersion() {
|
||||
public void testSetGenericListElementValueTypeCoercion() {
|
||||
// TODO currently failing since setValue does a getValue and "Wien" string != PlaceOfBirth - check with andy
|
||||
setValue("placesLivedList[0]", "Wien");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetGenericListElementValueTypeCoersionOK() {
|
||||
public void testSetGenericListElementValueTypeCoercionOK() {
|
||||
setValue("booleanList[0]", "true", Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
@ -171,12 +171,12 @@ public class SetValueTests extends AbstractExpressionTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetPropertyTypeCoersion() {
|
||||
public void testSetPropertyTypeCoercion() {
|
||||
setValue("publicBoolean", "true", Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetPropertyTypeCoersionThroughSetter() {
|
||||
public void testSetPropertyTypeCoercionThroughSetter() {
|
||||
setValue("SomeProperty", "true", Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,9 +73,9 @@ public class MapDataSourceLookupTests {
|
|||
@Test
|
||||
public void addingDataSourcePermitsOverride() throws Exception {
|
||||
Map<String, DataSource> dataSources = new HashMap<>();
|
||||
StubDataSource overridenDataSource = new StubDataSource();
|
||||
StubDataSource overriddenDataSource = new StubDataSource();
|
||||
StubDataSource expectedDataSource = new StubDataSource();
|
||||
dataSources.put(DATA_SOURCE_NAME, overridenDataSource);
|
||||
dataSources.put(DATA_SOURCE_NAME, overriddenDataSource);
|
||||
MapDataSourceLookup lookup = new MapDataSourceLookup();
|
||||
lookup.setDataSources(dataSources);
|
||||
lookup.addDataSource(DATA_SOURCE_NAME, expectedDataSource); // must override existing entry
|
||||
|
|
|
@ -80,7 +80,7 @@ class DatabaseStartupValidatorTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void shouldCallValidatonTwiceWhenNotValid() throws Exception {
|
||||
void shouldCallValidationTwiceWhenNotValid() throws Exception {
|
||||
given(connection.isValid(1)).willReturn(false, true);
|
||||
|
||||
validator.afterPropertiesSet();
|
||||
|
@ -90,7 +90,7 @@ class DatabaseStartupValidatorTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void shouldCallValidatonTwiceInCaseOfException() throws Exception {
|
||||
void shouldCallValidationTwiceInCaseOfException() throws Exception {
|
||||
given(connection.isValid(1)).willThrow(new SQLException("Test")).willReturn(true);
|
||||
|
||||
validator.afterPropertiesSet();
|
||||
|
@ -118,7 +118,7 @@ class DatabaseStartupValidatorTests {
|
|||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void shouldExecuteValidatonTwiceOnError() throws Exception {
|
||||
void shouldExecuteValidationTwiceOnError() throws Exception {
|
||||
String validationQuery = "SELECT NOW() FROM DUAL";
|
||||
Statement statement = mock(Statement.class);
|
||||
given(connection.createStatement()).willReturn(statement);
|
||||
|
|
|
@ -70,7 +70,7 @@ public class StompHeaderAccessorTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void createWithUnubscribeNativeHeaders() {
|
||||
public void createWithUnsubscribeNativeHeaders() {
|
||||
MultiValueMap<String, String> extHeaders = new LinkedMultiValueMap<>();
|
||||
extHeaders.add(StompHeaderAccessor.STOMP_ID_HEADER, "s1");
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests<Jaxb2Marsh
|
|||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void unmarshalAnXmlReferingToAWrappedXmlElementDecl() throws Exception {
|
||||
public void unmarshalAnXmlReferringToAWrappedXmlElementDecl() throws Exception {
|
||||
// SPR-10714
|
||||
unmarshaller = new Jaxb2Marshaller();
|
||||
unmarshaller.setPackagesToScan(new String[] { "org.springframework.oxm.jaxb" });
|
||||
|
|
|
@ -35,7 +35,7 @@ public class MapConnectionFactoryLookupUnitTests {
|
|||
private static final String CONNECTION_FACTORY_NAME = "connectionFactory";
|
||||
|
||||
@Test
|
||||
public void getConnectionFactorysReturnsUnmodifiableMap() {
|
||||
public void getConnectionFactoriesReturnsUnmodifiableMap() {
|
||||
MapConnectionFactoryLookup lookup = new MapConnectionFactoryLookup();
|
||||
Map<String, ConnectionFactory> connectionFactories = lookup.getConnectionFactories();
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class AutowiredConfigurationErrorsIntegrationTests {
|
|||
AutowiredRepeatedTestMethod.class,
|
||||
AutowiredParameterizedTestMethod.class
|
||||
})
|
||||
void autowiredTestMethodsTestTemplateMethodsAndLifecyleMethods(Class<?> testClass) {
|
||||
void autowiredTestMethodsTestTemplateMethodsAndLifecycleMethods(Class<?> testClass) {
|
||||
testEventsFor(testClass)
|
||||
.assertStatistics(stats -> stats.started(1).succeeded(0).failed(1))
|
||||
.assertThatEvents().haveExactly(1,
|
||||
|
@ -111,7 +111,7 @@ class AutowiredConfigurationErrorsIntegrationTests {
|
|||
NonStaticAutowiredBeforeAllMethod.class,
|
||||
NonStaticAutowiredAfterAllMethod.class
|
||||
})
|
||||
void autowiredNonStaticClassLevelLifecyleMethods(Class<?> testClass) {
|
||||
void autowiredNonStaticClassLevelLifecycleMethods(Class<?> testClass) {
|
||||
containerEventsFor(testClass)
|
||||
.assertStatistics(stats -> stats.started(2).succeeded(1).failed(1))
|
||||
.assertThatEvents().haveExactly(1,
|
||||
|
|
|
@ -168,7 +168,7 @@ class ActiveProfilesUtilsTests extends AbstractContextConfigurationUtilsTests {
|
|||
* @since 4.0
|
||||
*/
|
||||
@Test
|
||||
void resolveActiveProfilesWithOverridenInheritedResolver() {
|
||||
void resolveActiveProfilesWithOverriddenInheritedResolver() {
|
||||
assertResolvedProfiles(OverriddenInheritedFooActiveProfilesResolverTestCase.class, "bar");
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ class DirtiesContextTestExecutionListenerTests {
|
|||
|
||||
@Test
|
||||
void declaredViaMetaAnnotationWithOverriddenAttributes() throws Exception {
|
||||
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverridenAttributes.class);
|
||||
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverriddenAttributes.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,7 @@ class DirtiesContextTestExecutionListenerTests {
|
|||
}
|
||||
|
||||
@MetaDirtyWithOverrides(classMode = AFTER_CLASS, hierarchyMode = EXHAUSTIVE)
|
||||
static class DirtiesContextViaMetaAnnotationWithOverridenAttributes {
|
||||
static class DirtiesContextViaMetaAnnotationWithOverriddenAttributes {
|
||||
|
||||
void test() {
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class DefaultControllerSpecTests {
|
|||
@Test
|
||||
public void configurerConsumers() {
|
||||
TestConsumer<ArgumentResolverConfigurer> argumentResolverConsumer = new TestConsumer<>();
|
||||
TestConsumer<RequestedContentTypeResolverBuilder> contenTypeResolverConsumer = new TestConsumer<>();
|
||||
TestConsumer<RequestedContentTypeResolverBuilder> contentTypeResolverConsumer = new TestConsumer<>();
|
||||
TestConsumer<CorsRegistry> corsRegistryConsumer = new TestConsumer<>();
|
||||
TestConsumer<FormatterRegistry> formatterConsumer = new TestConsumer<>();
|
||||
TestConsumer<ServerCodecConfigurer> codecsConsumer = new TestConsumer<>();
|
||||
|
@ -84,7 +84,7 @@ public class DefaultControllerSpecTests {
|
|||
|
||||
new DefaultControllerSpec(new MyController())
|
||||
.argumentResolvers(argumentResolverConsumer)
|
||||
.contentTypeResolver(contenTypeResolverConsumer)
|
||||
.contentTypeResolver(contentTypeResolverConsumer)
|
||||
.corsMappings(corsRegistryConsumer)
|
||||
.formatters(formatterConsumer)
|
||||
.httpMessageCodecs(codecsConsumer)
|
||||
|
@ -93,7 +93,7 @@ public class DefaultControllerSpecTests {
|
|||
.build();
|
||||
|
||||
assertThat(argumentResolverConsumer.getValue()).isNotNull();
|
||||
assertThat(contenTypeResolverConsumer.getValue()).isNotNull();
|
||||
assertThat(contentTypeResolverConsumer.getValue()).isNotNull();
|
||||
assertThat(corsRegistryConsumer.getValue()).isNotNull();
|
||||
assertThat(formatterConsumer.getValue()).isNotNull();
|
||||
assertThat(codecsConsumer.getValue()).isNotNull();
|
||||
|
|
|
@ -110,8 +110,8 @@ class RequestMappingDataBindingIntegrationTests extends AbstractRequestMappingIn
|
|||
}
|
||||
|
||||
@ModelAttribute
|
||||
public Mono<Foo> addFooAttribute(@PathVariable("id") Optional<Long> optiponalId) {
|
||||
return optiponalId.map(id -> Mono.just(new Foo(id))).orElse(Mono.empty());
|
||||
public Mono<Foo> addFooAttribute(@PathVariable("id") Optional<Long> optionalId) {
|
||||
return optionalId.map(id -> Mono.just(new Foo(id))).orElse(Mono.empty());
|
||||
}
|
||||
|
||||
@PostMapping("/foos/{id}")
|
||||
|
|
|
@ -335,7 +335,7 @@ public class WebMvcConfigurationSupportTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void defaultThemeResolverfiguration() {
|
||||
public void defaultThemeResolverConfiguration() {
|
||||
ApplicationContext context = initContext(WebConfig.class);
|
||||
ThemeResolver themeResolver = context.getBean(THEME_RESOLVER_BEAN_NAME, ThemeResolver.class);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ class RequestMappingInfoTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void compareToWithImpicitVsExplicitHttpMethodDeclaration() {
|
||||
void compareToWithImplicitVsExplicitHttpMethodDeclaration() {
|
||||
RequestMappingInfo noMethods = RequestMappingInfo.paths().build();
|
||||
RequestMappingInfo oneMethod = RequestMappingInfo.paths().methods(GET).build();
|
||||
RequestMappingInfo oneMethodOneParam = RequestMappingInfo.paths().methods(GET).params("foo").build();
|
||||
|
|
|
@ -222,7 +222,7 @@ public class UrlTagTests extends AbstractTagTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void createQueryStringOneParamForExsistingQueryString() throws JspException {
|
||||
public void createQueryStringOneParamForExistingQueryString() throws JspException {
|
||||
List<Param> params = new ArrayList<>();
|
||||
Set<String> usedParams = new HashSet<>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue