mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
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:
Vendored
+4
-4
@@ -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();
|
||||
|
||||
+5
-5
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -82,7 +82,7 @@ class JCacheEhCacheApiTests extends AbstractValueAdaptingCacheTests<JCacheCache>
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPutIfAbsentNullValue() {
|
||||
void putIfAbsentNullValue() {
|
||||
JCacheCache cache = getCache(true);
|
||||
|
||||
String key = createRandomKey();
|
||||
|
||||
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
+9
-12
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
+2
-2
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user