Commit Graph

831 Commits

Author SHA1 Message Date
Juergen Hoeller 84d3808b3b Upgrade to Mockito 2.2
Issue: SPR-14880
2016-11-03 22:53:35 +01:00
Stephane Nicoll e3f6b61743 Polish 2016-10-29 11:15:26 +02:00
Stephane Nicoll 30291a8cd7 Allow to customize TestDispatcherServlet
This commit introduces the `DispatcherServletCustomizer` callback
interface that can be used to customize the `DispatcherServlet` that a
`MockMvc` is using.

Previously, only the `dispatchOptions` flag can be customized. This
commit allows to customize any property of `DispatcherServlet` before it
is initialized.

Issue: SPR-14277
2016-10-29 10:58:29 +02:00
Sam Brannen d59caaa2a7 Polishing 2016-10-28 16:37:33 +02:00
Sam Brannen 5c9350b8cb Support @EnabledIf & @DisabledIf w/o loading ApplicationContext
Prior to this commit, when using @EnabledIf or @DisabledIf in Spring's
JUnit Jupiter support, the test's ApplicationContext was always eagerly
loaded, even if the ApplicationContext would never be used (i.e., the
test was disabled). This behavior can lead to undesirable side effects
-- for example, attempting to load an application context that requires
services only available on the CI server when the test is not actually
running on the CI server.

This commit addresses this issue by introducing new boolean
`loadContext` flags in @EnabledIf and @DisabledIf. By default these
flags are set to false which means that the user's test application
context will not be loaded to evaluate the expression. On the contrary,
a dummy application context will be loaded instead, and expressions
will be evaluated against that dummy context. Consequently, if the user
wishes to interact with properties from the Spring Environment or with
beans from the test application context, the `loadContext` must be
explicitly set to true.

In addition, expressions which evaluate to a String must now evaluate
to exactly "true" or "false" (ignoring case and surrounding whitespace).

Issue: SPR-14649
2016-10-27 16:52:32 +02:00
Rossen Stoyanchev 0e886abf3d Sync MockServerHttpRequest in spring-test/spring-web 2016-10-21 15:17:28 -04:00
Juergen Hoeller 3726c6f18d Polishing 2016-10-21 12:26:27 +02:00
Stephane Nicoll fc8bad36c9 Fix formatting
Closes gh-1206
2016-10-15 11:55:07 +03:00
Philippe Marschall ae5b0c6fb5 Replace J2EE with Java EE
String with version 5 the name of Java Platform, Enterprise Edition
changed from J2EE to Java EE. However a lot of the documentation still
uses the term J2EE.

This commit includes the following changes:

 * replace J2EE with Java EE where appropriate

This is not a blind search and replace. The following occurrences
remain unchanged:

 * references to old J2EE releases, most notably 1.3 and 1.4.
 * references to "Expert One-On-One J2EE Design and Development"
 * references to "Core J2EE patterns"
 * XML namespaces
 * package names

Issue: SPR-14811
See gh-1206
2016-10-15 11:49:00 +03:00
Rossen Stoyanchev 6cb7d51ee5 Polish 2016-10-14 17:16:23 -04:00
Sam Brannen a795fd4714 Add support for URI templates in redirectedUrl() & forwardedUrl()
Prior to this commit, the redirectedUrl() and forwardedUrl() methods in
MockMvcResultMatchers supported fully constructed URLs and URLs
containing Ant-style path patterns. However, URI templates were not
supported for these result matchers even though the request path can be
built using URL templates -- for example, via the get() and post()
methods in MockMvcRequestBuilders.

This commit addresses this shortcoming by allowing users to supply a
URL template instead of a fully constructed URL to redirectedUrl() and
forwardedUrl(). To populate the URL template, template variables may be
supplied to redirectedUrl() and forwardedUrl() as var-args.

Issue: SPR-14790
2016-10-13 17:02:00 +02:00
Sam Brannen 509796a4b5 Polish MockMvcResultMatchers[Tests] 2016-10-13 17:01:47 +02:00
Sam Brannen 8cf1933148 Only print request/response body if char enc is present in MVC Test
Commit e65a1a4372 introduced support in PrintingResultHandler for only
printing the request or response body in the Spring MVC Test framework
if the content type is known to be text-based (e.g., plain text, HTML,
XHTML, XML, JSON, etc.). For unknown content types the body is assumed
to be text-based and is therefore always printed. The latter behavior,
however, is undesirable since the content may in fact not be text-based.

This commit addresses this issue by making the printing of the request
or response body an opt-in feature. Specifically, if a character
encoding has been set, the request or response body will be printed by
the PrintingResultHandler. Note, however, that the character encoding
is set to ISO-8859-1 in MockHttpServletResponse by default.

In addition, MockHttpServletRequest's getContentAsString() method now
throws an IllegalStateException if the character encoding has not been
set.

Issue: SPR-14776
2016-10-13 16:55:14 +02:00
Sam Brannen e65a1a4372 Print only printable request/response body in MVC Test
Prior to this commit, PrintingResultHandler always printed the request
or response body regardless of its content type. For binary content,
however, the output was unreadable and therefore useless.

This commit addresses this issue by only printing the request or
response body if it is "printable" (i.e., if its content type is known
to be text-based such as plain text, HTML, XHTML, XML, JSON, etc.). If
the content type is unknown (e.g., unspecified for the HTTP request in
the test), it is assumed that the body is printable.

Issue: SPR-14776
2016-10-11 20:19:26 +02:00
Sam Brannen 487bc7505b Print request body in PrintingResultHandler in Spring MVC Test
Prior to this commit, the PrintingResultHandler used by the various
print() and log() methods in Spring MVC Test printed the response body
but not the request body.

Since request bodies are sometimes generated programmatically, however,
it can be beneficial to have the dynamically generated request body
logged as well.

This commit therefore prints the request body in PrintingResultHandler
by delegating to the recently introduced getContentAsString() method in
MockHttpServletRequest.

Issue: SPR-14717
2016-10-03 18:05:58 +02:00
Sam Brannen 04b8ae921e Introduce getContentAsByteArray()/getContentAsString() in MockHtttpSvltReq
In order to improve debugging and logging within test suites, this
commit introduces getContentAsByteArray() and getContentAsString()
methods in MockHttpServletRequest, analogous to the existing methods in
MockHttpServletResponse.

Issue: SPR-14717
2016-10-03 18:05:58 +02:00
Juergen Hoeller fb7ae010c8 Avoid unnecessary generics on emptyMap/Set/List 2016-09-26 18:04:49 +02:00
Sam Brannen 2f2e6dffb4 Upgrade to TestNG 6.9.12 2016-09-09 18:02:47 +02:00
Sam Brannen 2699504cb8 Introduce concurrency tests for Spring's JUnit 4 support
Whereas the existing TestContextConcurrencyTests verify support for
concurrency in the TestContextManager and TestContext, this commit
introduces SpringJUnit4ConcurrencyTests that verify support for
concurrent test execution in Spring's JUnit 4 support, namely in the
SpringRunner, SpringClassRule, and SpringMethodRule.

The tests executed by this new test class come from a hand-picked
collection of test classes within the test suite that is intended to
cover most categories of tests that are currently supported by the
TestContext Framework on JUnit 4.

Note, however, that the chosen test classes intentionally do not
include any classes that fall under the following categories.

 - tests that make use of Spring's @DirtiesContext support

 - tests that make use of JUnit 4's @FixMethodOrder support

 - tests that commit changes to the state of a shared in-memory database

Issue: SPR-5863
2016-09-05 17:26:25 +02:00
Sam Brannen e822e4cbe8 Improve exception msg for inactive test ApplicationContext
This commit improves the exception message thrown when a test's
ApplicationContext is no longer active by explaining that the cause
may be due to parallel test execution.

Issue: SPR-5863
2016-09-05 13:39:21 +02:00
Sam Brannen fbfad8695e Further improve thread safety for attributes in DefaultTestContext
Issue: SPR-5863
2016-09-05 13:34:25 +02:00
Sam Brannen a10a8e56df Support concurrent execution in TestContextManager & DefaultTestContext
Prior to this commit, executing tests concurrently in the TestContext
Framework (TCF) was unsupported and typically lead to unpredictable
results.

This commit addresses this core issue by supporting concurrent
execution in the TestContextManager and the DefaultTestContext.

Specifically, the TestContextManager now uses ThreadLocal storage for
the current TestContext, thereby ensuring that any registered
TestExecutionListeners and the TestContextManager itself operate on a
TestContext specific to the current thread.

In order to avoid repeatedly incurring the costs of the overhead of the
TCF bootstrapping process, the original TestContext built by the
TestContextBootstrapper is used as a template which is then passed to
the copy constructor of the concrete implementation of the TestContext
to create the context for the current thread. DefaultTestContext now
implements such a copy constructor, and all concrete implementations of
TestContext are encouraged to do the same.

If the TestContext built by the TestContextBootstrapper does not
provide a copy constructor, thread-safety and support for concurrency
are left completely to the implementation of the concrete TestContext.

Note, however, that this commit does not address any thread-safety or
concurrency issues in the ContextLoader SPI or its implementations.

Issue: SPR-5863
2016-09-02 20:28:02 +02:00
Sam Brannen ec7aefa858 Improve concurrency in DefaultTestContext regarding attributes
This commit inlines the basic implementation of AttributeAccessorSupport
and converts the LinkedHashMap to a ConcurrentHashMap.

In addition, attributes are now included in toString().

Issue: SPR-5863
2016-09-02 19:14:31 +02:00
Sam Brannen 5fe3bcf8f9 Polishing 2016-09-02 18:39:31 +02:00
Rossen Stoyanchev c813405ca3 Add @since tags 2016-09-02 12:19:50 -04:00
Rossen Stoyanchev a1ac51256a Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421
2016-09-02 12:15:00 -04:00
Sam Brannen 5202250179 Polish SpringClassRule and SpringMethodRule 2016-09-01 16:34:03 +02:00
Sam Brannen d9eaa5f3ac Use Map.computeIfAbsent() in SpringClassRule
Replace manual synchronization block in SpringClassRule with Java 8's
Map.computeIfAbsent().

Issue: SPR-12421
2016-09-01 13:38:42 +02:00
Sam Brannen feb02f813e Polishing 2016-08-31 20:52:39 +02:00
Sam Brannen e574820dc9 Introduce tests for @Nested tests in JUnit Jupiter
This commit introduces integration tests that verify the expected
behavior for @Nested tests in conjunction with the SpringExtension for
JUnit Jupiter, including automatic application of
TestExecutionListeners to the enclosing test instance of a @Nested
test instance.

Issue: SPR-14150
2016-08-31 20:29:08 +02:00
Sam Brannen ab7b5e5c77 Demo how to use SpringClassRule in nested test classes
Due to restrictions imposed by JUnit 4, the SpringClassRule must be
declared as a public static field, which makes it impossible to be
declared directly within a nested (i.e., inner) test class.

This commit demonstrates a work-around that makes it possible to use
the SpringClassRule and SpringMethodRule in a nested (i.e., inner) test
class when using a custom JUnit 4 runner such as the
HierarchicalContextRunner from Stefan Bechtold.

The trick is to have inner test classes extend a class that properly
declares the SpringClassRule and SpringMethodRule. The
SpringRuleConfigurer in this commit serves as an example.

Note, however, that each such nested test class must declare its own
@ContextConfiguration. Furthermore, TestExecutionListeners in the
Spring TestContext Framework are not applied to the enclosing instance
of such an inner test class, meaning that @Autowired fields in the
enclosing instance will not be injected, etc.

Issue: SPR-14150
2016-08-31 19:35:00 +02:00
Sam Brannen 634d1c03a3 Introduce @EnabledIf support for JUnit Jupiter
This commit picks up where SPR-14614 left off by introducing a new
@EnabledIf annotation to serve as a logical companion to @DisabledIf.

In addition, this commit extracts common logic from DisabledIfCondition
into a new AbstractExpressionEvaluatingCondition base class which the
new EnabledIfCondition also extends.

An @EnabledOnMac annotation is also included in the Javadoc as well as
in the test suite to demonstrate support for custom composed annotations.

Issue: SPR-14644
2016-08-31 16:11:58 +02:00
Juergen Hoeller ab9fea6b8d Polishing
(cherry picked from commit 3767092)
2016-08-31 02:08:31 +02:00
Juergen Hoeller 03609c1518 Consistent comma splitting without regex overhead
Issue: SPR-14635
2016-08-30 23:56:58 +02:00
Sam Brannen b6220cc19d Trim expressions supplied to @DisabledIf
Prior to this commit, the DisabledIfCondition did not trim whitespace
from expressions configured via @DisabledIf. Consequently, results such
as "  true  " would evaluate to "false".

This commit fixes this problem by trimming all expressions configured
via @DisabledIf.

Issue: SPR-14614
2016-08-29 15:47:38 +02:00
Sam Brannen d6d05e8ca0 Remove trailing whitespace in Java source code 2016-08-29 15:25:10 +02:00
Sam Brannen 9d21abcd37 Introduce dedicated tests for DisabledIfCondition
This commit introduces tests for DisabledIfCondition that verify actual
condition evaluation results and exception handling; whereas, the
existing tests in DisabledIfTestCase only test the "happy paths" and
standard cases.

Issue: SPR-14614
2016-08-29 15:17:59 +02:00
Sam Brannen 54d6f250e2 Disallow empty expression in @DisabledIf
This commit ensures that a user provides a non-empty expression in
declarations of @DisabledIf.

Issue: SPR-14614
2016-08-29 13:43:38 +02:00
Juergen Hoeller 728a548199 Consistent use of JDK 7 AssertionError with root cause
Issue: SPR-13188
2016-08-29 11:53:00 +02:00
Sam Brannen 19369094ac Revise @DisabledIf support for JUnit Jupiter
- Extracted stand-alone DisabledIfCondition from the SpringExtension
  so that the condition is only evaluated when necessary.

- Simplified implementation of DisabledIfCondition.

- Overhauled and extended logging in DisabledIfCondition.

- DisabledIfCondition now throws an IllegalStateException if @DisabledIf
  is not present on the test element or if the expression does not
  evaluate to a String or Boolean.

- Each generated ConditionEvaluationResult now includes the actual
  expression in the default reason.

- @DisabledIf is now auto-configured to be evaluated by the
  DisabledIfCondition since it is now meta-annotated with
  @ExtendWith(DisabledIfCondition.class)

- Overhauled documentation for @DisabledIf and provided standard
  examples as well as an @DisabledOnMac annotation to demonstrate
  support for custom composed annotations.

Issue: SPR-14614
2016-08-28 21:12:38 +02:00
Tadaya Tsuyukubo c03f6c6d85 Introduce @DisabledIf annotation for JUnit 5
This commit introduces @DisabledIf annotation that takes SpEL as a
condition.  The condition is evaluated at run time whether to disable
JUnit 5 (Jupiter) test method/class.

Issue: SPR-14614
2016-08-28 21:12:38 +02:00
Juergen Hoeller dfdfd72a3e Polishing
(cherry picked from commit 430180a)
2016-08-26 18:59:40 +02:00
Rossen Stoyanchev 7fdb892042 Support target type in JsonPath assertions
This change adds support for a target type in JsonPath assertions in
Spring MVC Test.

The existing assertValue(String expression, Object expectedValue)
transparently falls back on using an alternative JsonPath API that
allows specifying the target type to coerce to.

There is also a new overloaded method
assertValue(String expression, Matcher<T> matcher, Class<T> targetType)
for use with Hamcrest matchers where the target type can be specified.

Issue: SPR-14498
2016-08-26 10:38:03 -04:00
Sam Brannen 5998a297ce Simplify exception handling in JsonPathExpectationsHelper 2016-08-26 14:43:40 +02:00
Juergen Hoeller 14046575b0 Polishing 2016-08-26 13:27:33 +02:00
Rob Winch 966baea910 Fix HtmlUnitRequestBuilder merge
Previously invoking HtmlUnitRequestBuilder merge caused the pathInfo of
the parent to be corrupted. This could additional invocations with the
same parent.

This fix ensures that the parent is no longer directly used. Instead,
we create a copy of the parent by merging the parent that was passed in
with the copy.

Fixes SPR-14584
2016-08-12 20:43:01 -05:00
Juergen Hoeller 6157fad91f PersistenceAnnotationBeanPostProcessor obtains default EntityManagerFactory via getBean(Class) algorithm
Issue: SPR-7549
2016-08-11 22:42:06 +02:00
Juergen Hoeller eeeab27f1f Polishing
(cherry picked from commit 35e247a)
2016-08-10 16:42:21 +02:00
Juergen Hoeller 59a24b406a Polishing 2016-08-10 14:20:42 +02:00
Juergen Hoeller a4b6682c3e Consistent spelling for StandaloneMockMvcBuilder's addPlaceholderValue 2016-08-10 14:18:41 +02:00
Juergen Hoeller 8acceba641 Polishing
(cherry picked from commit aade2d1)
2016-08-09 12:42:57 +02:00
Juergen Hoeller eae079ac2b Polishing 2016-08-09 10:44:10 +02:00
Juergen Hoeller 47e9360d62 MockClientHttpResponse closes body stream on close()
Issue: SPR-14563
2016-08-09 10:43:50 +02:00
Juergen Hoeller e03dea1d64 Polishing 2016-07-26 17:15:19 +02:00
Sam Brannen 2a3e62ddfc Delete unused imports in spring-test 2016-07-23 17:23:32 +02:00
Marius Grama 3635c9dbfe Update xmlunit library to version 2.1.0
xmlunit 2.1.0 is the latest release for xmlunit.
Most of the xmlunit functionality used within spring-framework
was done through the xmlunit 1.x helper class
`org.custommonkey.xmlunit.XMLAssert`.

As of xmlunit 2.0.0 most of the XML comparison methods are done
through hamcrest matchers exposed by the xmlunit-matchers
library. In some cases during the migration, the matchers
had to be customized with custom `NodeMatcher` or
`DifferenceEvaluator` instances in order to keep the assertions
correct (they were performed with xmlunit 1.x previously).

Issue: SPR-14043
2016-07-21 15:04:21 +02:00
Juergen Hoeller 99be15f58b Revise encoding steps towards use of JDK Charset and StandardCharsets
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller f0c397e4e2 Comprehensive Servlet 3.1 support in spring-web and spring-test
Issue: SPR-14467
2016-07-15 22:11:14 +02:00
Sam Brannen fd008405a1 Note in TEL: before/after test exec. callbacks don't work w/ JUnit 4 rules
Issue: SPR-4365
2016-07-14 15:46:54 +02:00
Sam Brannen 3fa88c2b56 Document suppressed exception support in TestContextManager
Issue: SPR-14459
2016-07-14 15:43:18 +02:00
Sam Brannen adfea826cc Configure JUL/log4j for JUnit 5 in spring-test
Issue: SPR-14431
2016-07-13 22:06:46 +02:00
Sam Brannen 833deadddc Ensure test fails for the correct reason
Prior to this commit, a dynamic test in
FailingBeforeAndAfterMethodsSpringExtensionTestCase was failing but for
the wrong reason. Namely, the @Configuration class was private which
resulted in an IllegalStateException being thrown, when in fact
an AssertionFailedError was expected.

This commit addresses this by introducing an explicit check for an
AssertionFailedError.

Issue: SPR-4365
2016-07-13 21:10:47 +02:00
Sam Brannen 7ec85a3c3b Support suppressed exceptions in the TestContext framework
Prior to this commit, if multiple TestExecutionListener 'after' methods
threw an exception, only the first such exception was rethrown.
Subsequent exceptions were logged, but there was no way to access or
process them other than via the log file.

This commit addresses this shortcoming by making use of the support for
suppressed exceptions introduced in Java 7. Specifically, if multiple
TestExecutionListener 'after' methods throw an exception, the first
exception will be rethrown with subsequent exceptions suppressed in the
first one.

Issue: SPR-14459
2016-07-13 20:29:01 +02:00
Sam Brannen 5f176f50d3 Polishing 2016-07-13 18:18:40 +02:00
Sam Brannen 6162e30f3c Clean up warnings in AsyncTests 2016-07-13 16:39:49 +02:00
Rossen Stoyanchev 01a63dd84d Polish AsyncTests 2016-07-12 17:49:55 -04:00
Vladimir L 7da63c57b3 tests for asynchronous processing if controller returns StreamingResponseBody 2016-07-12 17:44:10 -04:00
Sam Brannen 68b3bc0394 Use Supplier<String> support in Assert in spring-test
This commit makes use of the new Supplier<String> variants of utility
methods in org.springframework.util.Assert within the spring-test
module.

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen 80018c67e7 Introduce before/after test execution support in the SpringExtension
Issue: SPR-4365
2016-07-11 15:44:51 +02:00
Sam Brannen da89332840 Introduce before/after test execution support in SpringJUnit4ClassRunner
Issue: SPR-4365
2016-07-11 15:13:40 +02:00
Sam Brannen 3da5fbe995 Introduce before/after test execution support in AbstractTestNGSpringContextTests
Issue: SPR-4365
2016-07-11 15:13:40 +02:00
Sam Brannen 087efa668c Introduce before/after test execution callbacks in TestContextManager
Issue: SPR-4365
2016-07-11 15:13:40 +02:00
Sam Brannen 5302566cbb Introduce before/after test execution callbacks in TestExecutionListener
Issue: SPR-4365
2016-07-11 15:13:40 +02:00
Sam Brannen 629b95bd5c Ensure TestContextManager always tracks after-class exception
This commit fixes a minor bug introduced in 0adc4921ed.

Issue: SPR-14447
2016-07-10 16:04:00 +02:00
Sam Brannen 966d951329 Remove deprecated @TransactionConfiguration & TxCfgAttributes
Issue: SPR-14430
2016-07-08 18:16:44 +02:00
Sam Brannen 57c43f4273 Delete unused import 2016-07-08 17:40:42 +02:00
Sam Brannen d6d4251550 Utilize default methods in TestExecutionListener
Issue: SPR-14432
2016-07-08 17:38:41 +02:00
Sam Brannen a0cad5c48f Use streams and lambdas in spring-test where feasible
Issue: SPR-13188
2016-07-08 17:38:40 +02:00
Sam Brannen 8fff1c2ac0 Polishing 2016-07-08 17:18:14 +02:00
Sam Brannen 80216c243d Annotate ContextCustomizer[Factory] with @FunctionalInterface
Issue: SPR-14432
2016-07-08 17:17:25 +02:00
Sam Brannen 7e783dd91f Delete temporary MethodParameterFactory solution
SPR-14055 introduced first-class support for the Java 8 Parameter API.

This commit therefore replaces the MethodParameterFactory with use of
the new SynthesizingMethodParameter.forParameter(Parameter) factory
method.

Issue: SPR-13575
2016-07-07 13:02:49 +02:00
Sam Brannen 862fb2af5f Upgrade to JUnit 5.0.0-M1
Issue: SPR-13575
2016-07-07 12:49:46 +02:00
Juergen Hoeller da9c24c41e Polishing 2016-07-06 18:11:33 +02:00
Stephane Nicoll e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Sam Brannen 9a9551bf18 Make JUnit Jupiter support classes package private
Issue: SPR-13575
2016-07-05 17:09:18 +02:00
Sam Brannen 045c678622 Clean up warnings in spring-test 2016-07-05 17:09:18 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller b5db5d3aac Broadly remove deprecated core classes and methods
Issue: SPR-14430
2016-07-05 15:52:49 +02:00
Sam Brannen 5f53a60120 Restrict visibility of internal MethodParameterFactory
Issue: SPR-14055
2016-07-05 15:20:01 +02:00
Sam Brannen 016fa0eb39 Upgrade test to Hibernate 5.2 2016-07-05 11:05:23 +02:00
Juergen Hoeller 51252ebbca Avoid defensive checks against Java 8 API (java.util.Optional etc)
This commit also fixes broken javadoc links and code references.

Issue: SPR-13188
2016-07-05 02:09:00 +02:00
Juergen Hoeller 54004e0d78 Upgrade to JPA 2.1+ and Bean Validation 1.1+; remove native support for Hibernate 3.6 and 4.x
Issue: SPR-13481
Issue: SPR-13827
2016-07-04 23:37:23 +02:00
Juergen Hoeller 2b3445df81 Drop Portlet MVC support
This commit also removes the corresponding deprecated Servlet MVC variant and updates DispatcherServlet.properties to point to RequestMappingHandlerMapping/Adapter by default.

Issue: SPR-14129
2016-07-04 23:33:47 +02:00
Sam Brannen 873fc53a2f Introduce support for JUnit 5 in the TestContext framework
This commit introduces initial support for JUnit Jupiter (i.e., the new
programming and extension models in JUnit 5) in the Spring TestContext
Framework.

Specifically, this commit introduces the following.

- SpringExtension: an implementation of multiple extension APIs from
  JUnit Jupiter that provides full support for the existing feature set
  of the Spring TestContext Framework. This support is enabled via
  @ExtendWith(SpringExtension.class).

- @SpringJUnitConfig: a composed annotation that combines
  @ExtendWith(SpringExtension.class) from JUnit Jupiter with
  @ContextConfiguration from the Spring TestContext Framework.

- @SpringJUnitWebConfig: a composed annotation that combines
  @ExtendWith(SpringExtension.class) from JUnit Jupiter with
  @ContextConfiguration and @WebAppConfiguration from the Spring
  TestContext Framework.

Issue: SPR-13575
2016-07-04 22:40:58 +02:00
Sam Brannen 3be0ea9128 Suppress deprecation warning in spring-test 2016-07-04 15:20:52 +02:00
Juergen Hoeller 080dcad218 Add missing package-info file for new test.context.web.socket package
Issue: SPR-14420
2016-07-02 15:46:21 +02:00
Juergen Hoeller b204437cef Polishing 2016-07-02 14:48:15 +02:00
Juergen Hoeller e5122d084a Avoid wrapping in plain RuntimeException in favor of IllegalStateException 2016-07-02 13:03:33 +02:00