Skip to content

Commit

Permalink
Fix typos in test code
Browse files Browse the repository at this point in the history
This commit fixes typos in test class names, test method names, and
test variable names.

Closes gh-28807
  • Loading branch information
marcwrobel authored and sbrannen committed Jul 13, 2022
1 parent 2e4d7e4 commit bd34996
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void copyPropertiesHonorsGenericTypeMatchesForUpperBoundedWildcard() {
* {@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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void instantiateClassWhenHasNoArgsConstructorCallsAware() {
}

@Test
public void instantiateClassWhenHasSingleContructorInjectsParams() {
public void instantiateClassWhenHasSingleConstructorInjectsParams() {
ArgsConstructor instance = instantiateClass(ArgsConstructor.class);
assertThat(instance.environment).isSameAs(this.environment);
assertThat(instance.beanFactory).isSameAs(this.registry);
Expand All @@ -84,7 +84,7 @@ public void instantiateClassWhenHasSingleContructorInjectsParams() {
}

@Test
public void instantiateClassWhenHasSingleContructorAndAwareInjectsParamsAndCallsAware() {
public void instantiateClassWhenHasSingleConstructorAndAwareInjectsParamsAndCallsAware() {
ArgsConstructorAndAware instance = instantiateClass(ArgsConstructorAndAware.class);
assertThat(instance.environment).isSameAs(this.environment);
assertThat(instance.setEnvironment).isSameAs(this.environment);
Expand All @@ -104,7 +104,7 @@ public void instantiateClassWhenHasMultipleConstructorsUsesNoArgsConstructor() {
}

@Test
public void instantiateClassWhenHasMutlipleConstructorsAndNotDefaultThrowsException() {
public void instantiateClassWhenHasMultipleConstructorsAndNotDefaultThrowsException() {
assertThatExceptionOfType(BeanInstantiationException.class).isThrownBy(() ->
instantiateClass(MultipleConstructorsWithNoDefault.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Phillip Webb
* @since 5.2
*/
class AnnotationBackCompatibiltyTests {
class AnnotationBackCompatibilityTests {

@Test
void multiplRoutesToMetaAnnotation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void inheritedAnnotationsStrategyOnClassHierarchyScansInCorrectOrder() {
}

@Test
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncudesOnlyOne() {
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncludesOnlyOne() {
Class<?> source = WithSingleSuperclassAndDoubleInherited.class;
assertThat(Arrays.stream(source.getAnnotations()).map(
Annotation::annotationType).map(Class::getName)).containsExactly(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void getActiveProfiles_fromSystemProperties_withMultipleProfiles() {
}

@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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ public void testSetListElementValue() {
}

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

Expand All @@ -171,12 +171,12 @@ public void testIndexingIntoUnsupportedType() {
}

@Test
public void testSetPropertyTypeCoersion() {
public void testSetPropertyTypeCoercion() {
setValue("publicBoolean", "true", Boolean.TRUE);
}

@Test
public void testSetPropertyTypeCoersionThroughSetter() {
public void testSetPropertyTypeCoercionThroughSetter() {
setValue("SomeProperty", "true", Boolean.TRUE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public void setDataSourcesIsAnIdempotentOperation() throws Exception {
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void shouldUseJdbc4IsValidByDefault() throws Exception {
}

@Test
void shouldCallValidatonTwiceWhenNotValid() throws Exception {
void shouldCallValidationTwiceWhenNotValid() throws Exception {
given(connection.isValid(1)).willReturn(false, true);

validator.afterPropertiesSet();
Expand All @@ -90,7 +90,7 @@ void shouldCallValidatonTwiceWhenNotValid() throws Exception {
}

@Test
void shouldCallValidatonTwiceInCaseOfException() throws Exception {
void shouldCallValidationTwiceInCaseOfException() throws Exception {
given(connection.isValid(1)).willThrow(new SQLException("Test")).willReturn(true);

validator.afterPropertiesSet();
Expand Down Expand Up @@ -118,7 +118,7 @@ void useValidationQueryInsteadOfIsValid() throws Exception {

@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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void createWithSubscribeNativeHeaders() {
}

@Test
public void createWithUnubscribeNativeHeaders() {
public void createWithUnsubscribeNativeHeaders() {
MultiValueMap<String, String> extHeaders = new LinkedMultiValueMap<>();
extHeaders.add(StompHeaderAccessor.STOMP_ID_HEADER, "s1");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void unmarshalPartialStaxSourceXmlStreamReader() throws Exception {

@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" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -111,7 +111,7 @@ void autowiredAndNonAutowiredTestMethods() {
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void resolveActiveProfilesWithMergedInheritedResolver() {
* @since 4.0
*/
@Test
void resolveActiveProfilesWithOverridenInheritedResolver() {
void resolveActiveProfilesWithOverriddenInheritedResolver() {
assertResolvedProfiles(OverriddenInheritedFooActiveProfilesResolverTestCase.class, "bar");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void declaredViaMetaAnnotationWithOverrides() throws Exception {

@Test
void declaredViaMetaAnnotationWithOverriddenAttributes() throws Exception {
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverridenAttributes.class);
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverriddenAttributes.class);
}
}

Expand Down Expand Up @@ -444,7 +444,7 @@ void test() {
}

@MetaDirtyWithOverrides(classMode = AFTER_CLASS, hierarchyMode = EXHAUSTIVE)
static class DirtiesContextViaMetaAnnotationWithOverridenAttributes {
static class DirtiesContextViaMetaAnnotationWithOverriddenAttributes {

void test() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void controllerAdviceWithClassArgument() {
@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<>();
Expand All @@ -84,7 +84,7 @@ public void configurerConsumers() {

new DefaultControllerSpec(new MyController())
.argumentResolvers(argumentResolverConsumer)
.contentTypeResolver(contenTypeResolverConsumer)
.contentTypeResolver(contentTypeResolverConsumer)
.corsMappings(corsRegistryConsumer)
.formatters(formatterConsumer)
.httpMessageCodecs(codecsConsumer)
Expand All @@ -93,7 +93,7 @@ public void configurerConsumers() {
.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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ public String handleDateParam(@RequestParam Date date) {
}

@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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public void defaultLocaleResolverConfiguration() {
}

@Test
public void defaultThemeResolverfiguration() {
public void defaultThemeResolverConfiguration() {
ApplicationContext context = initContext(WebConfig.class);
ThemeResolver themeResolver = context.getBean(THEME_RESOLVER_BEAN_NAME, ThemeResolver.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void matchCustomCondition() {
}

@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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void createQueryStringOneParam() throws JspException {
}

@Test
public void createQueryStringOneParamForExsistingQueryString() throws JspException {
public void createQueryStringOneParamForExistingQueryString() throws JspException {
List<Param> params = new ArrayList<>();
Set<String> usedParams = new HashSet<>();

Expand Down

0 comments on commit bd34996

Please sign in to comment.