Remove obsolete "test" prefix from test method names

Although this commit also changes the visibility of some test methods
to package-private, the remainder of that task will be addressed in
conjunction with gh-36496.

Closes gh-36495
This commit is contained in:
Sam Brannen
2026-03-18 18:16:15 +01:00
parent a81367f686
commit 4c14abf0cd
591 changed files with 3284 additions and 3306 deletions
@@ -66,7 +66,7 @@ class CaffeineCacheTests extends AbstractValueAdaptingCacheTests<CaffeineCache>
}
@Test
void testLoadingCacheGet() {
void loadingCacheGet() {
Object value = new Object();
CaffeineCache loadingCache = new CaffeineCache(CACHE_NAME, Caffeine.newBuilder()
.build(key -> value));
@@ -76,7 +76,7 @@ class CaffeineCacheTests extends AbstractValueAdaptingCacheTests<CaffeineCache>
}
@Test
void testLoadingCacheGetWithType() {
void loadingCacheGetWithType() {
String value = "value";
CaffeineCache loadingCache = new CaffeineCache(CACHE_NAME, Caffeine.newBuilder()
.build(key -> value));
@@ -86,7 +86,7 @@ class CaffeineCacheTests extends AbstractValueAdaptingCacheTests<CaffeineCache>
}
@Test
void testLoadingCacheGetWithWrongType() {
void loadingCacheGetWithWrongType() {
String value = "value";
CaffeineCache loadingCache = new CaffeineCache(CACHE_NAME, Caffeine.newBuilder()
.build(key -> value));
@@ -94,7 +94,7 @@ class CaffeineCacheTests extends AbstractValueAdaptingCacheTests<CaffeineCache>
}
@Test
void testPutIfAbsentNullValue() {
void putIfAbsentNullValue() {
CaffeineCache cache = getCache();
Object key = new Object();
@@ -78,26 +78,26 @@ class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
@Override
@Test
@Disabled("Multi cache manager support to be added")
public void testCustomCacheManager() {
protected void customCacheManager() {
}
@Test
void testEvictWithTransaction() {
void evictWithTransaction() {
txTemplate.executeWithoutResult(s -> testEvict(this.cs, false));
}
@Test
void testEvictEarlyWithTransaction() {
void evictEarlyWithTransaction() {
txTemplate.executeWithoutResult(s -> testEvictEarly(this.cs));
}
@Test
void testEvictAllWithTransaction() {
void evictAllWithTransaction() {
txTemplate.executeWithoutResult(s -> testEvictAll(this.cs, false));
}
@Test
void testEvictAllEarlyWithTransaction() {
void evictAllEarlyWithTransaction() {
txTemplate.executeWithoutResult(s -> testEvictAllEarly(this.cs));
}
@@ -82,7 +82,7 @@ class JCacheEhCacheApiTests extends AbstractValueAdaptingCacheTests<JCacheCache>
}
@Test
void testPutIfAbsentNullValue() {
void putIfAbsentNullValue() {
JCacheCache cache = getCache(true);
String key = createRandomKey();
@@ -50,7 +50,7 @@ class JCacheNamespaceDrivenTests extends AbstractJCacheAnnotationTests {
}
@Test
void testCacheErrorHandler() {
void cacheErrorHandler() {
JCacheInterceptor ci = ctx.getBean(JCacheInterceptor.class);
assertThat(ci.getErrorHandler()).isSameAs(ctx.getBean("errorHandler", CacheErrorHandler.class));
}
@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
class SimpleMailMessageTests {
@Test
void testSimpleMessageCopyCtor() {
void simpleMessageCopyCtor() {
SimpleMailMessage message = new SimpleMailMessage();
message.setFrom("me@mail.org");
message.setTo("you@mail.org");
@@ -81,8 +81,7 @@ class SimpleMailMessageTests {
}
@Test
void testDeepCopyOfStringArrayTypedFieldsOnCopyCtor() {
void deepCopyOfStringArrayTypedFieldsOnCopyCtor() {
SimpleMailMessage original = new SimpleMailMessage();
original.setTo("fiona@mail.org", "apple@mail.org");
original.setCc("he@mail.org", "she@mail.org");
@@ -103,7 +102,7 @@ class SimpleMailMessageTests {
* Tests that two equal SimpleMailMessages have equal hash codes.
*/
@Test
public final void testHashCode() {
void equalMessagesHaveEqualHashCodes() {
SimpleMailMessage message1 = new SimpleMailMessage();
message1.setFrom("from@somewhere");
message1.setReplyTo("replyTo@somewhere");
@@ -118,11 +117,11 @@ class SimpleMailMessageTests {
SimpleMailMessage message2 = new SimpleMailMessage(message1);
assertThat(message2).isEqualTo(message1);
assertThat(message2.hashCode()).isEqualTo(message1.hashCode());
assertThat(message2).hasSameHashCodeAs(message1);
}
@Test
public final void testEqualsObject() {
void equalsBehavior() {
SimpleMailMessage message1;
SimpleMailMessage message2;
@@ -160,15 +159,13 @@ class SimpleMailMessageTests {
}
@Test
void testCopyCtorChokesOnNullOriginalMessage() {
assertThatIllegalArgumentException().isThrownBy(() ->
new SimpleMailMessage(null));
void copyCtorChokesOnNullOriginalMessage() {
assertThatIllegalArgumentException().isThrownBy(() -> new SimpleMailMessage(null));
}
@Test
void testCopyToChokesOnNullTargetMessage() {
assertThatIllegalArgumentException().isThrownBy(() ->
new SimpleMailMessage().copyTo(null));
void copyToChokesOnNullTargetMessage() {
assertThatIllegalArgumentException().isThrownBy(() -> new SimpleMailMessage().copyTo(null));
}
}
@@ -441,13 +441,13 @@ class JavaMailSenderTests {
}
@Test
void testConnection() {
void connection() {
sender.setHost("host");
assertThatNoException().isThrownBy(sender::testConnection);
}
@Test
void testConnectionWithFailure() {
void connectionWithFailure() {
sender.setHost(null);
assertThatExceptionOfType(MessagingException.class).isThrownBy(sender::testConnection);
}
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class QuartzSchedulerLifecycleTests {
@Test // SPR-6354
public void destroyLazyInitSchedulerWithDefaultShutdownOrderDoesNotHang() {
void destroyLazyInitSchedulerWithDefaultShutdownOrderDoesNotHang() {
ConfigurableApplicationContext context =
new ClassPathXmlApplicationContext("quartzSchedulerLifecycleTests.xml", getClass());
assertThat(context.getBean("lazyInitSchedulerWithDefaultShutdownOrder")).isNotNull();
@@ -44,7 +44,7 @@ class QuartzSchedulerLifecycleTests {
}
@Test // SPR-6354
public void destroyLazyInitSchedulerWithCustomShutdownOrderDoesNotHang() {
void destroyLazyInitSchedulerWithCustomShutdownOrderDoesNotHang() {
ConfigurableApplicationContext context =
new ClassPathXmlApplicationContext("quartzSchedulerLifecycleTests.xml", getClass());
assertThat(context.getBean("lazyInitSchedulerWithCustomShutdownOrder")).isNotNull();
@@ -62,7 +62,7 @@ class FreeMarkerConfigurationFactoryBeanTests {
@Test
@SuppressWarnings("rawtypes")
public void freeMarkerConfigurationFactoryBeanWithNonFileResourceLoaderPath() throws Exception {
void freeMarkerConfigurationFactoryBeanWithNonFileResourceLoaderPath() throws Exception {
fcfb.setTemplateLoaderPath("file:/mydir");
Properties settings = new Properties();
settings.setProperty("localized_lookup", "false");
@@ -88,7 +88,7 @@ class FreeMarkerConfigurationFactoryBeanTests {
}
@Test // SPR-12448
public void freeMarkerConfigurationAsBean() {
void freeMarkerConfigurationAsBean() {
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
RootBeanDefinition loaderDef = new RootBeanDefinition(SpringTemplateLoader.class);
loaderDef.getConstructorArgumentValues().addGenericArgumentValue(new DefaultResourceLoader());