Skip to content

Commit bd34996

Browse files
marcwrobelsbrannen
authored andcommitted
Fix typos in test code
This commit fixes typos in test class names, test method names, and test variable names. Closes gh-28807
1 parent 2e4d7e4 commit bd34996

File tree

19 files changed

+32
-32
lines changed

19 files changed

+32
-32
lines changed

Diff for: spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void copyPropertiesHonorsGenericTypeMatchesForUpperBoundedWildcard() {
280280
* {@code Number} can NOT be copied to {@code Integer}.
281281
*/
282282
@Test
283-
void copyPropertiesDoesNotCopyeFromSuperTypeToSubType() {
283+
void copyPropertiesDoesNotCopyFromSuperTypeToSubType() {
284284
NumberHolder numberHolder = new NumberHolder();
285285
numberHolder.setNumber(Integer.valueOf(42));
286286
IntegerHolder integerHolder = new IntegerHolder();

Diff for: spring-context/src/test/java/org/springframework/context/annotation/ParserStrategyUtilsTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void instantiateClassWhenHasNoArgsConstructorCallsAware() {
7575
}
7676

7777
@Test
78-
public void instantiateClassWhenHasSingleContructorInjectsParams() {
78+
public void instantiateClassWhenHasSingleConstructorInjectsParams() {
7979
ArgsConstructor instance = instantiateClass(ArgsConstructor.class);
8080
assertThat(instance.environment).isSameAs(this.environment);
8181
assertThat(instance.beanFactory).isSameAs(this.registry);
@@ -84,7 +84,7 @@ public void instantiateClassWhenHasSingleContructorInjectsParams() {
8484
}
8585

8686
@Test
87-
public void instantiateClassWhenHasSingleContructorAndAwareInjectsParamsAndCallsAware() {
87+
public void instantiateClassWhenHasSingleConstructorAndAwareInjectsParamsAndCallsAware() {
8888
ArgsConstructorAndAware instance = instantiateClass(ArgsConstructorAndAware.class);
8989
assertThat(instance.environment).isSameAs(this.environment);
9090
assertThat(instance.setEnvironment).isSameAs(this.environment);
@@ -104,7 +104,7 @@ public void instantiateClassWhenHasMultipleConstructorsUsesNoArgsConstructor() {
104104
}
105105

106106
@Test
107-
public void instantiateClassWhenHasMutlipleConstructorsAndNotDefaultThrowsException() {
107+
public void instantiateClassWhenHasMultipleConstructorsAndNotDefaultThrowsException() {
108108
assertThatExceptionOfType(BeanInstantiationException.class).isThrownBy(() ->
109109
instantiateClass(MultipleConstructorsWithNoDefault.class));
110110
}

Diff for: spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibiltyTests.java renamed to spring-core/src/test/java/org/springframework/core/annotation/AnnotationBackCompatibilityTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @author Phillip Webb
3030
* @since 5.2
3131
*/
32-
class AnnotationBackCompatibiltyTests {
32+
class AnnotationBackCompatibilityTests {
3333

3434
@Test
3535
void multiplRoutesToMetaAnnotation() {

Diff for: spring-core/src/test/java/org/springframework/core/annotation/AnnotationsScannerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void inheritedAnnotationsStrategyOnClassHierarchyScansInCorrectOrder() {
120120
}
121121

122122
@Test
123-
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncudesOnlyOne() {
123+
void inheritedAnnotationsStrategyOnClassWhenHasAnnotationOnBothClassesIncludesOnlyOne() {
124124
Class<?> source = WithSingleSuperclassAndDoubleInherited.class;
125125
assertThat(Arrays.stream(source.getAnnotations()).map(
126126
Annotation::annotationType).map(Class::getName)).containsExactly(

Diff for: spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void getActiveProfiles_fromSystemProperties_withMultipleProfiles() {
242242
}
243243

244244
@Test
245-
void getActiveProfiles_fromSystemProperties_withMulitpleProfiles_withWhitespace() {
245+
void getActiveProfiles_fromSystemProperties_withMultipleProfiles_withWhitespace() {
246246
System.setProperty(ACTIVE_PROFILES_PROPERTY_NAME, " bar , baz "); // notice whitespace
247247
assertThat(environment.getActiveProfiles()).contains("bar", "baz");
248248
System.clearProperty(ACTIVE_PROFILES_PROPERTY_NAME);

Diff for: spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ public void testSetListElementValue() {
139139
}
140140

141141
@Test
142-
public void testSetGenericListElementValueTypeCoersion() {
142+
public void testSetGenericListElementValueTypeCoercion() {
143143
// TODO currently failing since setValue does a getValue and "Wien" string != PlaceOfBirth - check with andy
144144
setValue("placesLivedList[0]", "Wien");
145145
}
146146

147147
@Test
148-
public void testSetGenericListElementValueTypeCoersionOK() {
148+
public void testSetGenericListElementValueTypeCoercionOK() {
149149
setValue("booleanList[0]", "true", Boolean.TRUE);
150150
}
151151

@@ -171,12 +171,12 @@ public void testIndexingIntoUnsupportedType() {
171171
}
172172

173173
@Test
174-
public void testSetPropertyTypeCoersion() {
174+
public void testSetPropertyTypeCoercion() {
175175
setValue("publicBoolean", "true", Boolean.TRUE);
176176
}
177177

178178
@Test
179-
public void testSetPropertyTypeCoersionThroughSetter() {
179+
public void testSetPropertyTypeCoercionThroughSetter() {
180180
setValue("SomeProperty", "true", Boolean.TRUE);
181181
}
182182

Diff for: spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookupTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public void setDataSourcesIsAnIdempotentOperation() throws Exception {
7373
@Test
7474
public void addingDataSourcePermitsOverride() throws Exception {
7575
Map<String, DataSource> dataSources = new HashMap<>();
76-
StubDataSource overridenDataSource = new StubDataSource();
76+
StubDataSource overriddenDataSource = new StubDataSource();
7777
StubDataSource expectedDataSource = new StubDataSource();
78-
dataSources.put(DATA_SOURCE_NAME, overridenDataSource);
78+
dataSources.put(DATA_SOURCE_NAME, overriddenDataSource);
7979
MapDataSourceLookup lookup = new MapDataSourceLookup();
8080
lookup.setDataSources(dataSources);
8181
lookup.addDataSource(DATA_SOURCE_NAME, expectedDataSource); // must override existing entry

Diff for: spring-jdbc/src/test/java/org/springframework/jdbc/support/DatabaseStartupValidatorTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void shouldUseJdbc4IsValidByDefault() throws Exception {
8080
}
8181

8282
@Test
83-
void shouldCallValidatonTwiceWhenNotValid() throws Exception {
83+
void shouldCallValidationTwiceWhenNotValid() throws Exception {
8484
given(connection.isValid(1)).willReturn(false, true);
8585

8686
validator.afterPropertiesSet();
@@ -90,7 +90,7 @@ void shouldCallValidatonTwiceWhenNotValid() throws Exception {
9090
}
9191

9292
@Test
93-
void shouldCallValidatonTwiceInCaseOfException() throws Exception {
93+
void shouldCallValidationTwiceInCaseOfException() throws Exception {
9494
given(connection.isValid(1)).willThrow(new SQLException("Test")).willReturn(true);
9595

9696
validator.afterPropertiesSet();
@@ -118,7 +118,7 @@ void useValidationQueryInsteadOfIsValid() throws Exception {
118118

119119
@Test
120120
@SuppressWarnings("deprecation")
121-
void shouldExecuteValidatonTwiceOnError() throws Exception {
121+
void shouldExecuteValidationTwiceOnError() throws Exception {
122122
String validationQuery = "SELECT NOW() FROM DUAL";
123123
Statement statement = mock(Statement.class);
124124
given(connection.createStatement()).willReturn(statement);

Diff for: spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompHeaderAccessorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void createWithSubscribeNativeHeaders() {
7070
}
7171

7272
@Test
73-
public void createWithUnubscribeNativeHeaders() {
73+
public void createWithUnsubscribeNativeHeaders() {
7474
MultiValueMap<String, String> extHeaders = new LinkedMultiValueMap<>();
7575
extHeaders.add(StompHeaderAccessor.STOMP_ID_HEADER, "s1");
7676

Diff for: spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void unmarshalPartialStaxSourceXmlStreamReader() throws Exception {
126126

127127
@Test
128128
@SuppressWarnings("unchecked")
129-
public void unmarshalAnXmlReferingToAWrappedXmlElementDecl() throws Exception {
129+
public void unmarshalAnXmlReferringToAWrappedXmlElementDecl() throws Exception {
130130
// SPR-10714
131131
unmarshaller = new Jaxb2Marshaller();
132132
unmarshaller.setPackagesToScan(new String[] { "org.springframework.oxm.jaxb" });

Diff for: spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/lookup/MapConnectionFactoryLookupUnitTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class MapConnectionFactoryLookupUnitTests {
3535
private static final String CONNECTION_FACTORY_NAME = "connectionFactory";
3636

3737
@Test
38-
public void getConnectionFactorysReturnsUnmodifiableMap() {
38+
public void getConnectionFactoriesReturnsUnmodifiableMap() {
3939
MapConnectionFactoryLookup lookup = new MapConnectionFactoryLookup();
4040
Map<String, ConnectionFactory> connectionFactories = lookup.getConnectionFactories();
4141

Diff for: spring-test/src/test/java/org/springframework/test/context/junit/jupiter/AutowiredConfigurationErrorsIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class AutowiredConfigurationErrorsIntegrationTests {
7272
AutowiredRepeatedTestMethod.class,
7373
AutowiredParameterizedTestMethod.class
7474
})
75-
void autowiredTestMethodsTestTemplateMethodsAndLifecyleMethods(Class<?> testClass) {
75+
void autowiredTestMethodsTestTemplateMethodsAndLifecycleMethods(Class<?> testClass) {
7676
testEventsFor(testClass)
7777
.assertStatistics(stats -> stats.started(1).succeeded(0).failed(1))
7878
.assertThatEvents().haveExactly(1,
@@ -111,7 +111,7 @@ void autowiredAndNonAutowiredTestMethods() {
111111
NonStaticAutowiredBeforeAllMethod.class,
112112
NonStaticAutowiredAfterAllMethod.class
113113
})
114-
void autowiredNonStaticClassLevelLifecyleMethods(Class<?> testClass) {
114+
void autowiredNonStaticClassLevelLifecycleMethods(Class<?> testClass) {
115115
containerEventsFor(testClass)
116116
.assertStatistics(stats -> stats.started(2).succeeded(1).failed(1))
117117
.assertThatEvents().haveExactly(1,

Diff for: spring-test/src/test/java/org/springframework/test/context/support/ActiveProfilesUtilsTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void resolveActiveProfilesWithMergedInheritedResolver() {
168168
* @since 4.0
169169
*/
170170
@Test
171-
void resolveActiveProfilesWithOverridenInheritedResolver() {
171+
void resolveActiveProfilesWithOverriddenInheritedResolver() {
172172
assertResolvedProfiles(OverriddenInheritedFooActiveProfilesResolverTestCase.class, "bar");
173173
}
174174

Diff for: spring-test/src/test/java/org/springframework/test/context/support/DirtiesContextTestExecutionListenerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void declaredViaMetaAnnotationWithOverrides() throws Exception {
248248

249249
@Test
250250
void declaredViaMetaAnnotationWithOverriddenAttributes() throws Exception {
251-
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverridenAttributes.class);
251+
assertAfterClass(DirtiesContextViaMetaAnnotationWithOverriddenAttributes.class);
252252
}
253253
}
254254

@@ -444,7 +444,7 @@ void test() {
444444
}
445445

446446
@MetaDirtyWithOverrides(classMode = AFTER_CLASS, hierarchyMode = EXHAUSTIVE)
447-
static class DirtiesContextViaMetaAnnotationWithOverridenAttributes {
447+
static class DirtiesContextViaMetaAnnotationWithOverriddenAttributes {
448448

449449
void test() {
450450
}

Diff for: spring-test/src/test/java/org/springframework/test/web/reactive/server/DefaultControllerSpecTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void controllerAdviceWithClassArgument() {
7575
@Test
7676
public void configurerConsumers() {
7777
TestConsumer<ArgumentResolverConfigurer> argumentResolverConsumer = new TestConsumer<>();
78-
TestConsumer<RequestedContentTypeResolverBuilder> contenTypeResolverConsumer = new TestConsumer<>();
78+
TestConsumer<RequestedContentTypeResolverBuilder> contentTypeResolverConsumer = new TestConsumer<>();
7979
TestConsumer<CorsRegistry> corsRegistryConsumer = new TestConsumer<>();
8080
TestConsumer<FormatterRegistry> formatterConsumer = new TestConsumer<>();
8181
TestConsumer<ServerCodecConfigurer> codecsConsumer = new TestConsumer<>();
@@ -84,7 +84,7 @@ public void configurerConsumers() {
8484

8585
new DefaultControllerSpec(new MyController())
8686
.argumentResolvers(argumentResolverConsumer)
87-
.contentTypeResolver(contenTypeResolverConsumer)
87+
.contentTypeResolver(contentTypeResolverConsumer)
8888
.corsMappings(corsRegistryConsumer)
8989
.formatters(formatterConsumer)
9090
.httpMessageCodecs(codecsConsumer)
@@ -93,7 +93,7 @@ public void configurerConsumers() {
9393
.build();
9494

9595
assertThat(argumentResolverConsumer.getValue()).isNotNull();
96-
assertThat(contenTypeResolverConsumer.getValue()).isNotNull();
96+
assertThat(contentTypeResolverConsumer.getValue()).isNotNull();
9797
assertThat(corsRegistryConsumer.getValue()).isNotNull();
9898
assertThat(formatterConsumer.getValue()).isNotNull();
9999
assertThat(codecsConsumer.getValue()).isNotNull();

Diff for: spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public String handleDateParam(@RequestParam Date date) {
110110
}
111111

112112
@ModelAttribute
113-
public Mono<Foo> addFooAttribute(@PathVariable("id") Optional<Long> optiponalId) {
114-
return optiponalId.map(id -> Mono.just(new Foo(id))).orElse(Mono.empty());
113+
public Mono<Foo> addFooAttribute(@PathVariable("id") Optional<Long> optionalId) {
114+
return optionalId.map(id -> Mono.just(new Foo(id))).orElse(Mono.empty());
115115
}
116116

117117
@PostMapping("/foos/{id}")

Diff for: spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public void defaultLocaleResolverConfiguration() {
336336
}
337337

338338
@Test
339-
public void defaultThemeResolverfiguration() {
339+
public void defaultThemeResolverConfiguration() {
340340
ApplicationContext context = initContext(WebConfig.class);
341341
ThemeResolver themeResolver = context.getBean(THEME_RESOLVER_BEAN_NAME, ThemeResolver.class);
342342

Diff for: spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void matchCustomCondition() {
185185
}
186186

187187
@Test
188-
void compareToWithImpicitVsExplicitHttpMethodDeclaration() {
188+
void compareToWithImplicitVsExplicitHttpMethodDeclaration() {
189189
RequestMappingInfo noMethods = RequestMappingInfo.paths().build();
190190
RequestMappingInfo oneMethod = RequestMappingInfo.paths().methods(GET).build();
191191
RequestMappingInfo oneMethodOneParam = RequestMappingInfo.paths().methods(GET).params("foo").build();

Diff for: spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public void createQueryStringOneParam() throws JspException {
223223
}
224224

225225
@Test
226-
public void createQueryStringOneParamForExsistingQueryString() throws JspException {
226+
public void createQueryStringOneParamForExistingQueryString() throws JspException {
227227
List<Param> params = new ArrayList<>();
228228
Set<String> usedParams = new HashSet<>();
229229

0 commit comments

Comments
 (0)