Commit Graph

68 Commits

Author SHA1 Message Date
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +02:00
Juergen Hoeller 527776cde4 Removed JDK 8 workaround (not necessary anymore with build 88) 2013-05-07 18:11:53 +02:00
Juergen Hoeller f91be88f8c Temporary workaround for JDK 8 test compilation/execution problem
Issue: SPR-9639
2013-04-23 14:03:03 +02:00
Juergen Hoeller 19f783bdd7 Fixed general test suite problems found during OpenJDK 8 upgrade
Issue: SPR-9639
2013-04-23 13:54:19 +02:00
Juergen Hoeller cf93d38c56 Added "destroyBean(Object)" method to AutowireCapableBeanFactory
Driven by the need for implementing Bean Validation 1.1's "releaseInstance" method in SpringConstraintValidatorFactory, as a direct counterpart to the use of AutowireCapableBeanFactory's "createBean(Class)" in "getInstance".

Issue: SPR-8199
2013-03-28 22:22:42 +01:00
Juergen Hoeller deba32cad9 Upgraded all Servlet API mocks to Servlet 3.0 (with a little bit of Servlet 3.1 support in MockHttpServletResponse) 2013-03-20 17:19:34 +01:00
Rossen Stoyanchev 3654a620fb Disable AsyncTests in spring-test-mvc 2013-03-10 10:00:01 -04:00
Rossen Stoyanchev eefd1c4ca6 Add context hierarchy tests to Spring MVC Test
Issue: SPR-5613
2013-03-07 11:20:19 -05:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Wesley Hall fbac428e23 Fix DefaultMockMvcBuilder fluent API generic type
Changed upper bound of generic parameter for DefaultMockMvcBuilder from
MockMvcBuilder to DefaultMockMvcBuilder to allow for ongoing method
chaining in the fluent API style.

Issue: SPR-10277
2013-03-01 16:30:02 -05:00
Rossen Stoyanchev eda53ec1d8 Allow merge of MockMultipart- w/ Mock- request builder
Issue: SPR-10280
2013-02-15 09:43:08 -05:00
Rossen Stoyanchev b47d97c23a Improve error message for JSON path expressions
Issue: SPR-SPR-10275
2013-02-15 09:43:08 -05:00
Arnaud Cogoluègnes ccca82be1b Make StandaloneMockMvcBuilder interface consistent
The exception resolvers can now be set using a setter that expects
varargs, just like other infrastructure beans.

Issue: SPR-10279
2013-02-15 09:43:08 -05:00
Phillip Webb d89e30b864 Fix unnecessary @SupressWarnings annotations 2013-01-29 15:37:25 -08:00
Sam Brannen 33ee0ea4a6 Fix broken test in ContentAssertionTests 2013-01-15 11:56:27 +01:00
Rossen Stoyanchev b2d6596901 Add contentTypeCompatibleWith option to Spring MVC Test
An expectation such as content().contentType(MediaType.TEXT_PLAIN)
fails if the actual media type contains a charset or another parameter.
A new method allows comparing the media type and subtype only via
content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN).

Issue: SPR-10165
2013-01-14 22:00:55 -05:00
Chris Beams bfdc191035 Merge branch 'SPR-10093' into 3.2.x
* SPR-10093:
  Polish changes from pull request #205
2013-01-11 16:35:08 +01:00
Chris Beams 74137794da Polish changes from pull request #205
- Replace space intendation with tabs
 - Remove leading tabs on otherwise empty lines
 - Remove illegal {@link ...} syntax in Javadoc @see reference

Issue: SPR-10093
2013-01-11 16:32:52 +01:00
Sam Brannen 18bf860c27 Update Javadoc for MockMvc
Deleted reference to the obsolete configureWarRootDir() method from the
stand-alone spring-test-mvc project.
2013-01-11 00:31:37 +01:00
Chris Beams 0829cbfdd3 Update license header for recently modified files
Issue: SPR-7763, SPR-10140, SPR-10132, SPR-10093, SPR-10103
2013-01-08 16:23:46 +01:00
Arnaud Cogoluègnes a56d8f28fe Add support for HTTP OPTIONS in Spring MVC Test
Issue: SPR-10093
2013-01-08 10:01:51 -05:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams 4d97ff2479 Fix [dep-ann] warnings with @Deprecated 2012-12-28 22:50:45 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Craig Walls ccb1153440 Fix JavaDoc in MockRestServiceServer 2012-12-14 10:07:50 -05:00
Chris Beams f26534700a Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
2012-12-12 12:55:10 +01:00
Phillip Webb c8a3562933 Update test tiles.xml files to use v3 DTD
Update tiles.xml files used with tests to reference tiles-config_3_0
instead of tiles-config_2_1 DTD.

Prior to this commit tiles based tests would fail when building
offline or behind a proxy server.
2012-12-10 15:39:47 -08:00
Sam Brannen a436a57503 Move tests to spring-test module
When Spr9799XmlConfigTests and Spr9799AnnotationConfigTests were
created, there were issues with the classpath related to slf4j
dependencies that made it impossible for these classes to reside in the
spring-test module. Consequently, these tests were added to the
spring-test-mvc module. However, the issues with slf4j have since been
resolved in the Gradle build, and this commit therefore moves these test
classes to the spring-test module where they belong.

Issue: SPR-9799
2012-12-08 14:26:47 +01:00
Rossen Stoyanchev 3643d92cb8 Fix issue with creating ServletRequestAttributes
Prevously the FrameworkServlet created a new ServletRequestAttributes
instance for every request, unless the RequestContextHolder already
contained an instance whose type is not ServletRequestAttributes.
The main intent was that if RequestContextHolder contains a
PortletRequestAttributes, it should be left in place.

This change does an "instanceof" check against the request in
RequestContextHolder instead of an "equals" check on the type.
It still leaves PortletRequestAttributes in place but also allows
the previous request to be any sub-class of ServletRequestAttributes.

Issue: SPR-10025
2012-12-07 15:19:38 -05:00
Sam Brannen 69ace01640 Clean up warnings in spring-test
- Deleted unused imports.

 - Switched from junit.framework.Assert to org.junit.Assert, since the
   former is deprecated as of JUnit 4.11.

 - Suppressed warnings for continued deprecated usage of
   junit.framework.Assert.
2012-12-07 12:26:27 +01:00
Rossen Stoyanchev 31cb14e03a Remove Spring Security sample tests in spring-test-mvc
Those tests as well as Spring Hateoas tests will be added to respective
projects instead.
2012-12-05 19:10:13 -05:00
Sam Brannen ffd040b8d2 Javadoc in MockMvcClientHttpRequestFactoryTests
The Javadoc in MockMvcClientHttpRequestFactoryTests had been copied and
pasted from WebAppResourceTests. This commit updates the documentation
in MockMvcClientHttpRequestFactoryTests to reflect what the tests do.
2012-12-04 14:58:22 +01:00
Rossen Stoyanchev 9643ff3f1d Polish StandaloneMockMvcBuilder
Issue: SPR-10053
2012-12-03 15:11:12 -05:00
Rob Winch 157a1d6ee2 Rename MvcAsyncTask to WebAsyncTask
The name MvcAsyncTask is misleading because the class is part of Spring
Web as apposed to Spring MVC. This is also inconsistent with the other
async classes which use Web instead of Mvc.

This commit changes MvcAsyncTask to WebAsyncTask making it more
consistent with the jar it is found in and the other async classes.

Issue: SPR-10051
2012-11-28 16:55:45 -05:00
Rossen Stoyanchev 79edf627db Fix failing test from last commit
Issue: SPR-9917
2012-11-26 15:31:21 -05:00
Rossen Stoyanchev 3a50dafc90 Add MockMvcClientHttpRequestFactory
Issue: SPR-9917
2012-11-26 14:23:12 -05:00
Rossen Stoyanchev f30d33d32e Add spring-test-mvc tests with Spring HATEOAS links
Issue: SPR-9886
2012-11-26 13:00:00 -05:00
Rossen Stoyanchev 92ca8b32fb Add DefaultMvcResultTests 2012-11-16 09:48:12 -05:00
Rossen Stoyanchev f8bf577eff Fix failures in PrintingResultHandlerTests 2012-11-15 11:26:14 -05:00
Rossen Stoyanchev 8afcf717e2 Fix failing test from previous commit 2012-11-15 10:15:34 -05:00
Rossen Stoyanchev 1f2e89e3ed Print async result in Spring MVC Test ResultHandler 2012-11-15 09:45:38 -05:00
Rossen Stoyanchev 9e22ac496d Remove a couple more dependencies on hamcrest-lib
Issue: SPR-9961
2012-11-07 17:13:20 -05:00
Rossen Stoyanchev 4812fcccc4 Remove dependency on hamcrest-lib from spring-mvc-test
The change removes the use of concrete Matcher implementations and thus
the dependency on hamcrest-lib leaving hamcrest-core as the only
(optional) hamcrest dependency.

Issue: SPR-9961
2012-11-07 17:06:56 -05:00
Rossen Stoyanchev c348be2511 Add RequestBuilder for async dispatches
This change enanbles performing async dispatches via Spring MVC Test.
2012-11-05 21:18:06 -05:00
Rossen Stoyanchev 38cf91922c Fix intermittent test failure in AsyncTests 2012-11-05 11:51:02 -05:00
Rossen Stoyanchev 242bf7c4e3 Refine hamcrest dependency in spring-test-mvc project
1) removed the hamcrest-all dependency requirement and replaced it with
the more focused hamcrest-library dependency

2) added MatcherAssertionErrors as a replacement of
org.hamcrest.MatcherAssert, which in hamcrest 1.1 is only available
through the hamcrest-all dependency (and not in hamcrest-core nor in
the hamcrest embedded in JUnit 4.4 through 4.8)

3) changed the required hamcrest version from 1.1 to 1.3 and made sure
the spring-test-mvc project does not rely on newer hamcrest
functionality without checking if it is available first

Applications that already depend on older versions of hamcrest
(in particular 1.1) via hamcrest-library, hamcrest-all or as part of
junit 4.4 through 4.8 should not be disrupted if they add spring-test
but may wish to exclude the hamcrest-library transitive dependency
from spring-test in order to avoid extra jars in the classpath

Applications that depend on hamcrest 1.3 should not have to do anything

Issue: SPR-9940
2012-11-01 23:58:50 -04:00
Sam Brannen 462605987d Delete unused import 2012-10-31 17:46:24 +01:00