Deprecate JUnit 4 support in the TestContext framework
Closes gh-34794
This commit is contained in:
parent
2db1a63a92
commit
c74fc7ec90
|
@ -1,6 +1,13 @@
|
||||||
[[integration-testing-annotations-junit4]]
|
[[integration-testing-annotations-junit4]]
|
||||||
= Spring JUnit 4 Testing Annotations
|
= Spring JUnit 4 Testing Annotations
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
JUnit 4 support is deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-extension[`SpringExtension`]
|
||||||
|
and JUnit Jupiter.
|
||||||
|
====
|
||||||
|
|
||||||
The following annotations are supported only when used in conjunction with the
|
The following annotations are supported only when used in conjunction with the
|
||||||
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit4-runner[SpringRunner],
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit4-runner[SpringRunner],
|
||||||
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit4-rules[Spring's JUnit 4 rules], or
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit4-rules[Spring's JUnit 4 rules], or
|
||||||
|
@ -206,6 +213,3 @@ Kotlin::
|
||||||
----
|
----
|
||||||
<1> Repeat this test ten times.
|
<1> Repeat this test ten times.
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -483,6 +483,13 @@ Kotlin::
|
||||||
[[testcontext-junit4-runner]]
|
[[testcontext-junit4-runner]]
|
||||||
=== Spring JUnit 4 Runner
|
=== Spring JUnit 4 Runner
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
JUnit 4 support is deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-extension[`SpringExtension`]
|
||||||
|
and JUnit Jupiter.
|
||||||
|
====
|
||||||
|
|
||||||
The Spring TestContext Framework offers full integration with JUnit 4 through a custom
|
The Spring TestContext Framework offers full integration with JUnit 4 through a custom
|
||||||
runner (supported on JUnit 4.12 or higher). By annotating test classes with
|
runner (supported on JUnit 4.12 or higher). By annotating test classes with
|
||||||
`@RunWith(SpringJUnit4ClassRunner.class)` or the shorter `@RunWith(SpringRunner.class)`
|
`@RunWith(SpringJUnit4ClassRunner.class)` or the shorter `@RunWith(SpringRunner.class)`
|
||||||
|
@ -538,6 +545,13 @@ be configured through `@ContextConfiguration`.
|
||||||
[[testcontext-junit4-rules]]
|
[[testcontext-junit4-rules]]
|
||||||
=== Spring JUnit 4 Rules
|
=== Spring JUnit 4 Rules
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
JUnit 4 support is deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-extension[`SpringExtension`]
|
||||||
|
and JUnit Jupiter.
|
||||||
|
====
|
||||||
|
|
||||||
The `org.springframework.test.context.junit4.rules` package provides the following JUnit
|
The `org.springframework.test.context.junit4.rules` package provides the following JUnit
|
||||||
4 rules (supported on JUnit 4.12 or higher):
|
4 rules (supported on JUnit 4.12 or higher):
|
||||||
|
|
||||||
|
@ -607,6 +621,13 @@ Kotlin::
|
||||||
[[testcontext-support-classes-junit4]]
|
[[testcontext-support-classes-junit4]]
|
||||||
=== JUnit 4 Base Classes
|
=== JUnit 4 Base Classes
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
JUnit 4 support is deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-extension[`SpringExtension`]
|
||||||
|
for JUnit Jupiter.
|
||||||
|
====
|
||||||
|
|
||||||
The `org.springframework.test.context.junit4` package provides the following support
|
The `org.springframework.test.context.junit4` package provides the following support
|
||||||
classes for JUnit 4-based test cases (supported on JUnit 4.12 or higher):
|
classes for JUnit 4-based test cases (supported on JUnit 4.12 or higher):
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -94,11 +94,15 @@ import java.lang.annotation.Target;
|
||||||
* @see org.springframework.test.context.junit4.statements.ProfileValueChecker
|
* @see org.springframework.test.context.junit4.statements.ProfileValueChecker
|
||||||
* @see org.springframework.context.annotation.Profile
|
* @see org.springframework.context.annotation.Profile
|
||||||
* @see org.springframework.test.context.ActiveProfiles
|
* @see org.springframework.test.context.ActiveProfiles
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
@Inherited
|
@Inherited
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public @interface IfProfileValue {
|
public @interface IfProfileValue {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2012 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -40,7 +40,11 @@ import org.jspecify.annotations.Nullable;
|
||||||
* @see ProfileValueSourceConfiguration
|
* @see ProfileValueSourceConfiguration
|
||||||
* @see IfProfileValue
|
* @see IfProfileValue
|
||||||
* @see ProfileValueUtils
|
* @see ProfileValueUtils
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public interface ProfileValueSource {
|
public interface ProfileValueSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -37,11 +37,15 @@ import java.lang.annotation.Target;
|
||||||
* @see ProfileValueSource
|
* @see ProfileValueSource
|
||||||
* @see IfProfileValue
|
* @see IfProfileValue
|
||||||
* @see ProfileValueUtils
|
* @see ProfileValueUtils
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
@Inherited
|
@Inherited
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public @interface ProfileValueSourceConfiguration {
|
public @interface ProfileValueSourceConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,7 +38,9 @@ import org.springframework.util.StringUtils;
|
||||||
* @see ProfileValueSource
|
* @see ProfileValueSource
|
||||||
* @see ProfileValueSourceConfiguration
|
* @see ProfileValueSourceConfiguration
|
||||||
* @see IfProfileValue
|
* @see IfProfileValue
|
||||||
|
* @deprecated since Spring Framework 7.0 with no replacement
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public abstract class ProfileValueUtils {
|
public abstract class ProfileValueUtils {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(ProfileValueUtils.class);
|
private static final Log logger = LogFactory.getLog(ProfileValueUtils.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2021 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -44,10 +44,14 @@ import java.lang.annotation.Target;
|
||||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
||||||
* @see org.springframework.test.context.junit4.statements.SpringRepeat
|
* @see org.springframework.test.context.junit4.statements.SpringRepeat
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public @interface Repeat {
|
public @interface Repeat {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -25,7 +25,11 @@ import org.springframework.util.Assert;
|
||||||
* @author Rod Johnson
|
* @author Rod Johnson
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public final class SystemProfileValueSource implements ProfileValueSource {
|
public final class SystemProfileValueSource implements ProfileValueSource {
|
||||||
|
|
||||||
private static final SystemProfileValueSource INSTANCE = new SystemProfileValueSource();
|
private static final SystemProfileValueSource INSTANCE = new SystemProfileValueSource();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -25,7 +25,10 @@ import org.springframework.core.annotation.AnnotatedElementUtils;
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
|
* @see org.springframework.test.context.TestContextAnnotationUtils
|
||||||
|
* @deprecated since Spring Framework 7.0 with no replacement
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public abstract class TestAnnotationUtils {
|
public abstract class TestAnnotationUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -43,10 +43,14 @@ import java.lang.annotation.Target;
|
||||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
||||||
* @see org.springframework.test.context.junit4.statements.SpringFailOnTimeout
|
* @see org.springframework.test.context.junit4.statements.SpringFailOnTimeout
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public @interface Timed {
|
public @interface Timed {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -62,8 +62,12 @@ import org.springframework.test.context.TestExecutionListeners;
|
||||||
* @see TestExecutionListeners
|
* @see TestExecutionListeners
|
||||||
* @see AbstractTransactionalJUnit4SpringContextTests
|
* @see AbstractTransactionalJUnit4SpringContextTests
|
||||||
* @see org.springframework.test.context.testng.AbstractTestNGSpringContextTests
|
* @see org.springframework.test.context.testng.AbstractTestNGSpringContextTests
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public abstract class AbstractJUnit4SpringContextTests implements ApplicationContextAware {
|
public abstract class AbstractJUnit4SpringContextTests implements ApplicationContextAware {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -78,8 +78,12 @@ import org.springframework.util.Assert;
|
||||||
* @see org.springframework.test.context.transaction.AfterTransaction
|
* @see org.springframework.test.context.transaction.AfterTransaction
|
||||||
* @see org.springframework.test.jdbc.JdbcTestUtils
|
* @see org.springframework.test.jdbc.JdbcTestUtils
|
||||||
* @see org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests
|
* @see org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public abstract class AbstractTransactionalJUnit4SpringContextTests extends AbstractJUnit4SpringContextTests {
|
public abstract class AbstractTransactionalJUnit4SpringContextTests extends AbstractJUnit4SpringContextTests {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -93,7 +93,11 @@ import org.springframework.util.ReflectionUtils;
|
||||||
* @see AbstractTransactionalJUnit4SpringContextTests
|
* @see AbstractTransactionalJUnit4SpringContextTests
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringClassRule
|
* @see org.springframework.test.context.junit4.rules.SpringClassRule
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
|
public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(SpringJUnit4ClassRunner.class);
|
private static final Log logger = LogFactory.getLog(SpringJUnit4ClassRunner.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -35,7 +35,11 @@ import org.junit.runners.model.InitializationError;
|
||||||
* @see SpringJUnit4ClassRunner
|
* @see SpringJUnit4ClassRunner
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringClassRule
|
* @see org.springframework.test.context.junit4.rules.SpringClassRule
|
||||||
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
* @see org.springframework.test.context.junit4.rules.SpringMethodRule
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public final class SpringRunner extends SpringJUnit4ClassRunner {
|
public final class SpringRunner extends SpringJUnit4ClassRunner {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -81,7 +81,11 @@ import org.springframework.util.Assert;
|
||||||
* @see SpringMethodRule
|
* @see SpringMethodRule
|
||||||
* @see org.springframework.test.context.TestContextManager
|
* @see org.springframework.test.context.TestContextManager
|
||||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class SpringClassRule implements TestRule {
|
public class SpringClassRule implements TestRule {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(SpringClassRule.class);
|
private static final Log logger = LogFactory.getLog(SpringClassRule.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -95,7 +95,11 @@ import org.springframework.test.context.junit4.statements.SpringRepeat;
|
||||||
* @see SpringClassRule
|
* @see SpringClassRule
|
||||||
* @see org.springframework.test.context.TestContextManager
|
* @see org.springframework.test.context.TestContextManager
|
||||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class SpringMethodRule implements MethodRule {
|
public class SpringMethodRule implements MethodRule {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(SpringMethodRule.class);
|
private static final Log logger = LogFactory.getLog(SpringMethodRule.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2021 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -39,7 +39,11 @@ import org.springframework.util.Assert;
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see IfProfileValue
|
* @see IfProfileValue
|
||||||
* @see ProfileValueUtils
|
* @see ProfileValueUtils
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class ProfileValueChecker extends Statement {
|
public class ProfileValueChecker extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2016 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -36,7 +36,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunBeforeTestClassCallbacks
|
* @see RunBeforeTestClassCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunAfterTestClassCallbacks extends Statement {
|
public class RunAfterTestClassCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -37,7 +37,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunBeforeTestExecutionCallbacks
|
* @see RunBeforeTestExecutionCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunAfterTestExecutionCallbacks extends Statement {
|
public class RunAfterTestExecutionCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2016 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -37,7 +37,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunBeforeTestMethodCallbacks
|
* @see RunBeforeTestMethodCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunAfterTestMethodCallbacks extends Statement {
|
public class RunAfterTestMethodCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -30,7 +30,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunAfterTestMethodCallbacks
|
* @see RunAfterTestMethodCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunBeforeTestClassCallbacks extends Statement {
|
public class RunBeforeTestClassCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -34,7 +34,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunAfterTestExecutionCallbacks
|
* @see RunAfterTestExecutionCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunBeforeTestExecutionCallbacks extends Statement {
|
public class RunBeforeTestExecutionCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,7 +32,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
* @see RunAfterTestMethodCallbacks
|
* @see RunAfterTestMethodCallbacks
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunBeforeTestMethodCallbacks extends Statement {
|
public class RunBeforeTestMethodCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -29,7 +29,11 @@ import org.springframework.test.context.TestContextManager;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class RunPrepareTestInstanceCallbacks extends Statement {
|
public class RunPrepareTestInstanceCallbacks extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,7 +38,11 @@ import org.springframework.util.Assert;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class SpringFailOnTimeout extends Statement {
|
public class SpringFailOnTimeout extends Statement {
|
||||||
|
|
||||||
private final Statement next;
|
private final Statement next;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,7 +32,11 @@ import org.springframework.test.annotation.TestAnnotationUtils;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see #evaluate()
|
* @see #evaluate()
|
||||||
|
* @deprecated since Spring Framework 7.0 in favor of the
|
||||||
|
* {@link org.springframework.test.context.junit.jupiter.SpringExtension SpringExtension}
|
||||||
|
* and JUnit Jupiter
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "7.0")
|
||||||
public class SpringRepeat extends Statement {
|
public class SpringRepeat extends Statement {
|
||||||
|
|
||||||
protected static final Log logger = LogFactory.getLog(SpringRepeat.class);
|
protected static final Log logger = LogFactory.getLog(SpringRepeat.class);
|
||||||
|
|
|
@ -31,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
class ProfileValueUtilsTests {
|
class ProfileValueUtilsTests {
|
||||||
|
|
||||||
private static final String NON_ANNOTATED_METHOD = "nonAnnotatedMethod";
|
private static final String NON_ANNOTATED_METHOD = "nonAnnotatedMethod";
|
||||||
|
@ -140,7 +141,6 @@ class ProfileValueUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void isTestEnabledInThisEnvironmentForProvidedProfileValueSourceMethodAndClass() throws Exception {
|
void isTestEnabledInThisEnvironmentForProvidedProfileValueSourceMethodAndClass() throws Exception {
|
||||||
|
|
||||||
ProfileValueSource profileValueSource = SystemProfileValueSource.getInstance();
|
ProfileValueSource profileValueSource = SystemProfileValueSource.getInstance();
|
||||||
|
|
||||||
assertMethodIsEnabled(profileValueSource, NON_ANNOTATED_METHOD, NonAnnotated.class);
|
assertMethodIsEnabled(profileValueSource, NON_ANNOTATED_METHOD, NonAnnotated.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -46,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
// Override the default loader configured by the CustomXmlBootstrapper
|
// Override the default loader configured by the CustomXmlBootstrapper
|
||||||
@ContextConfiguration(classes = BasicTestConfiguration.class, loader = AnnotationConfigContextLoader.class)
|
@ContextConfiguration(classes = BasicTestConfiguration.class, loader = AnnotationConfigContextLoader.class)
|
||||||
@TestPropertySource
|
@TestPropertySource
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BasicSpringVintageTests {
|
public class BasicSpringVintageTests {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -41,6 +41,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC
|
||||||
@ContextConfiguration(classes = WebTestConfiguration.class)
|
@ContextConfiguration(classes = WebTestConfiguration.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
@TestPropertySource(properties = "test.engine = vintage")
|
@TestPropertySource(properties = "test.engine = vintage")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class WebSpringVintageTests {
|
public class WebSpringVintageTests {
|
||||||
|
|
||||||
MockMvc mockMvc;
|
MockMvc mockMvc;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -35,6 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@ContextConfiguration("test-config.xml")
|
@ContextConfiguration("test-config.xml")
|
||||||
@TestPropertySource(properties = "test.engine = vintage")
|
@TestPropertySource(properties = "test.engine = vintage")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class XmlSpringVintageTests {
|
public class XmlSpringVintageTests {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -35,6 +35,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||||
@TestExecutionListeners(ClassLevelDisabledSpringRunnerTests.CustomTestExecutionListener.class)
|
@TestExecutionListeners(ClassLevelDisabledSpringRunnerTests.CustomTestExecutionListener.class)
|
||||||
@IfProfileValue(name = "ClassLevelDisabledSpringRunnerTests.profile_value.name", value = "enigmaX")
|
@IfProfileValue(name = "ClassLevelDisabledSpringRunnerTests.profile_value.name", value = "enigmaX")
|
||||||
@DisabledInAotMode("@IfProfileValue is not supported for AOT processing")
|
@DisabledInAotMode("@IfProfileValue is not supported for AOT processing")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ClassLevelDisabledSpringRunnerTests {
|
public class ClassLevelDisabledSpringRunnerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -44,6 +44,7 @@ import static org.springframework.transaction.support.TransactionSynchronization
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ConcreteTransactionalJUnit4SpringContextTests extends AbstractTransactionalJUnit4SpringContextTests
|
public class ConcreteTransactionalJUnit4SpringContextTests extends AbstractTransactionalJUnit4SpringContextTests
|
||||||
implements BeanNameAware, InitializingBean {
|
implements BeanNameAware, InitializingBean {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -49,6 +49,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@TestExecutionListeners({})
|
@TestExecutionListeners({})
|
||||||
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class EnabledAndIgnoredSpringRunnerTests {
|
public class EnabledAndIgnoredSpringRunnerTests {
|
||||||
|
|
||||||
protected static final String NAME = "EnabledAndIgnoredSpringRunnerTests.profile_value.name";
|
protected static final String NAME = "EnabledAndIgnoredSpringRunnerTests.profile_value.name";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -28,13 +28,14 @@ import org.springframework.test.context.TestExecutionListeners;
|
||||||
import static org.springframework.test.context.junit4.JUnitTestingUtils.runTestsAndAssertCounters;
|
import static org.springframework.test.context.junit4.JUnitTestingUtils.runTestsAndAssertCounters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies proper handling of JUnit's {@link Test#expected() @Test(expected = ...)}
|
* Verifies proper handling of JUnit's {@link Test#expected() @Test(expected = ...)}
|
||||||
* support in conjunction with the {@link SpringRunner}.
|
* support in conjunction with the {@link SpringRunner}.
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ExpectedExceptionSpringRunnerTests {
|
public class ExpectedExceptionSpringRunnerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -50,6 +50,7 @@ import static org.springframework.test.context.junit4.JUnitTestingUtils.runTests
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*/
|
*/
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class FailingBeforeAndAfterMethodsSpringRunnerTests {
|
public class FailingBeforeAndAfterMethodsSpringRunnerTests {
|
||||||
|
|
||||||
protected final Class<?> clazz;
|
protected final Class<?> clazz;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,6 +38,7 @@ import org.springframework.test.context.aot.DisabledInAotMode;
|
||||||
*/
|
*/
|
||||||
@ProfileValueSourceConfiguration(HardCodedProfileValueSourceSpringRunnerTests.HardCodedProfileValueSource.class)
|
@ProfileValueSourceConfiguration(HardCodedProfileValueSourceSpringRunnerTests.HardCodedProfileValueSource.class)
|
||||||
@DisabledInAotMode("Because EnabledAndIgnoredSpringRunnerTests is disabled in AOT mode")
|
@DisabledInAotMode("Because EnabledAndIgnoredSpringRunnerTests is disabled in AOT mode")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class HardCodedProfileValueSourceSpringRunnerTests extends EnabledAndIgnoredSpringRunnerTests {
|
public class HardCodedProfileValueSourceSpringRunnerTests extends EnabledAndIgnoredSpringRunnerTests {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -47,6 +47,7 @@ import static org.springframework.test.context.junit4.JUnitTestingUtils.runTests
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class RepeatedSpringRunnerTests {
|
public class RepeatedSpringRunnerTests {
|
||||||
|
|
||||||
protected static final AtomicInteger invocationCount = new AtomicInteger();
|
protected static final AtomicInteger invocationCount = new AtomicInteger();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,6 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@TestExecutionListeners({})
|
@TestExecutionListeners({})
|
||||||
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class SpringJUnit47ClassRunnerRuleTests {
|
public class SpringJUnit47ClassRunnerRuleTests {
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
|
@ -53,4 +54,5 @@ public class SpringJUnit47ClassRunnerRuleTests {
|
||||||
public void testB() {
|
public void testB() {
|
||||||
assertThat(name.getMethodName()).isEqualTo("testB");
|
assertThat(name.getMethodName()).isEqualTo("testB");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -36,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatException;
|
||||||
* @author Rick Evans
|
* @author Rick Evans
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class SpringJUnit4ClassRunnerTests {
|
public class SpringJUnit4ClassRunnerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -22,15 +22,12 @@ import org.springframework.test.context.TestExecutionListeners;
|
||||||
import org.springframework.test.context.aot.DisabledInAotMode;
|
import org.springframework.test.context.aot.DisabledInAotMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* Simple unit test to verify that the {@link SpringRunner} does not
|
||||||
* Simple unit test to verify that {@link SpringRunner} does not
|
* hinder correct functionality of standard JUnit 4 testing features.
|
||||||
* hinder correct functionality of standard JUnit 4.4+ testing features.
|
*
|
||||||
* </p>
|
* <p>Note that {@link TestExecutionListeners @TestExecutionListeners} is
|
||||||
* <p>
|
|
||||||
* Note that {@link TestExecutionListeners @TestExecutionListeners} is
|
|
||||||
* explicitly configured with an empty list, thus disabling all default
|
* explicitly configured with an empty list, thus disabling all default
|
||||||
* listeners.
|
* listeners.
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
|
@ -39,6 +36,7 @@ import org.springframework.test.context.aot.DisabledInAotMode;
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@TestExecutionListeners({})
|
@TestExecutionListeners({})
|
||||||
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
@DisabledInAotMode("Does not load an ApplicationContext and thus not supported for AOT processing")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class StandardJUnit4FeaturesSpringRunnerTests extends StandardJUnit4FeaturesTests {
|
public class StandardJUnit4FeaturesSpringRunnerTests extends StandardJUnit4FeaturesTests {
|
||||||
|
|
||||||
/* All tests are in the parent class... */
|
/* All tests are in the parent class... */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -43,6 +43,7 @@ import static org.springframework.test.context.junit4.JUnitTestingUtils.runTests
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TimedSpringRunnerTests {
|
public class TimedSpringRunnerTests {
|
||||||
|
|
||||||
protected Class<?> getTestCase() {
|
protected Class<?> getTestCase() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -40,6 +40,7 @@ import static org.springframework.test.transaction.TransactionAssert.assertThatT
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@ContextConfiguration("/org/springframework/test/context/transaction/transactionalTests-context.xml")
|
@ContextConfiguration("/org/springframework/test/context/transaction/transactionalTests-context.xml")
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TimedTransactionalSpringRunnerTests {
|
public class TimedTransactionalSpringRunnerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -44,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@RecordApplicationEvents
|
@RecordApplicationEvents
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class JUnit4ApplicationEventsAsyncIntegrationTests {
|
public class JUnit4ApplicationEventsAsyncIntegrationTests {
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -41,6 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@RecordApplicationEvents
|
@RecordApplicationEvents
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class JUnit4ApplicationEventsIntegrationTests {
|
public class JUnit4ApplicationEventsIntegrationTests {
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -29,6 +29,7 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public abstract class SpringRuleConfigurer {
|
public abstract class SpringRuleConfigurer {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -35,6 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class AutowiredRuleSpr15927Tests {
|
public class AutowiredRuleSpr15927Tests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -41,6 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
* @see Subclass2AppCtxRuleTests
|
* @see Subclass2AppCtxRuleTests
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BaseAppCtxRuleTests {
|
public class BaseAppCtxRuleTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -41,6 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BasicAnnotationConfigWacSpringRuleTests extends AbstractBasicWacTests {
|
public class BasicAnnotationConfigWacSpringRuleTests extends AbstractBasicWacTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -51,6 +51,7 @@ import static org.springframework.test.transaction.TransactionAssert.assertThatT
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
@ContextConfiguration("/org/springframework/test/context/transaction/transactionalTests-context.xml")
|
@ContextConfiguration("/org/springframework/test/context/transaction/transactionalTests-context.xml")
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BeforeAndAfterTransactionAnnotationSpringRuleTests {
|
public class BeforeAndAfterTransactionAnnotationSpringRuleTests {
|
||||||
|
|
||||||
private static final String JANE = "jane";
|
private static final String JANE = "jane";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,6 +32,7 @@ import org.springframework.test.context.junit4.ClassLevelDisabledSpringRunnerTes
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ClassLevelDisabledSpringRuleTests extends ClassLevelDisabledSpringRunnerTests {
|
public class ClassLevelDisabledSpringRuleTests extends ClassLevelDisabledSpringRunnerTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,6 +32,7 @@ import org.springframework.test.context.junit4.EnabledAndIgnoredSpringRunnerTest
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class EnabledAndIgnoredSpringRuleTests extends EnabledAndIgnoredSpringRunnerTests {
|
public class EnabledAndIgnoredSpringRuleTests extends EnabledAndIgnoredSpringRunnerTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class FailingBeforeAndAfterMethodsSpringRuleTests extends FailingBeforeAndAfterMethodsSpringRunnerTests {
|
public class FailingBeforeAndAfterMethodsSpringRuleTests extends FailingBeforeAndAfterMethodsSpringRunnerTests {
|
||||||
|
|
||||||
@Parameters(name = "{0}")
|
@Parameters(name = "{0}")
|
||||||
|
|
|
@ -35,6 +35,7 @@ import static org.mockito.Mockito.when;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @see <a href="https://github.com/spring-projects/spring-boot/issues/27693">gh-27693</a>
|
* @see <a href="https://github.com/spring-projects/spring-boot/issues/27693">gh-27693</a>
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class MockitoBeanAndSpringMethodRuleWithRepeatJUnit4IntegrationTests {
|
public class MockitoBeanAndSpringMethodRuleWithRepeatJUnit4IntegrationTests {
|
||||||
|
|
||||||
private static int invocations;
|
private static int invocations;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -47,6 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
*/
|
*/
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
@ContextConfiguration("../ParameterizedDependencyInjectionTests-context.xml")
|
@ContextConfiguration("../ParameterizedDependencyInjectionTests-context.xml")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ParameterizedSpringRuleTests {
|
public class ParameterizedSpringRuleTests {
|
||||||
|
|
||||||
private static final AtomicInteger invocationCount = new AtomicInteger();
|
private static final AtomicInteger invocationCount = new AtomicInteger();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -65,6 +65,7 @@ import static org.springframework.test.transaction.TransactionAssert.assertThatT
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class ProgrammaticTxMgmtSpringRuleTests {
|
public class ProgrammaticTxMgmtSpringRuleTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2024 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -40,6 +40,7 @@ import org.springframework.test.context.junit4.RepeatedSpringRunnerTests;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class RepeatedSpringRuleTests extends RepeatedSpringRunnerTests {
|
public class RepeatedSpringRuleTests extends RepeatedSpringRunnerTests {
|
||||||
|
|
||||||
@Parameters(name = "{0}")
|
@Parameters(name = "{0}")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -35,6 +35,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TimedSpringRuleTests extends TimedSpringRunnerTests {
|
public class TimedSpringRuleTests extends TimedSpringRunnerTests {
|
||||||
|
|
||||||
// All tests are in superclass.
|
// All tests are in superclass.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -39,6 +39,7 @@ import static org.springframework.test.transaction.TransactionAssert.assertThatT
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TimedTransactionalSpringRuleTests extends TimedTransactionalSpringRunnerTests {
|
public class TimedTransactionalSpringRuleTests extends TimedTransactionalSpringRunnerTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -50,6 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
@Sql({ "../../jdbc/schema.sql", "../../jdbc/data.sql" })
|
@Sql({ "../../jdbc/schema.sql", "../../jdbc/data.sql" })
|
||||||
@DirtiesContext
|
@DirtiesContext
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class TransactionalSqlScriptsSpringRuleTests {
|
public class TransactionalSqlScriptsSpringRuleTests {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -36,6 +36,7 @@ import static org.mockito.Mockito.mock;
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.3.17
|
* @since 4.3.17
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class SpringFailOnTimeoutTests {
|
public class SpringFailOnTimeoutTests {
|
||||||
|
|
||||||
private final Statement statement = mock();
|
private final Statement statement = mock();
|
||||||
|
|
|
@ -46,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class JUnit4SpringContextWebTests extends AbstractJUnit4SpringContextTests implements ServletContextAware {
|
public class JUnit4SpringContextWebTests extends AbstractJUnit4SpringContextTests implements ServletContextAware {
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|
Loading…
Reference in New Issue