Commit Graph

7951 Commits

Author SHA1 Message Date
Sam Brannen f77bf2422e Polish Javadoc for LookupOverride and related code 2014-02-09 00:30:44 +01:00
Sam Brannen c335e99e3f Remove trailing whitespace from source code 2014-02-08 17:30:39 +01:00
Sam Brannen 1f778530b5 Polish test classes
- Consistent importing of org.junit.Assert.*;
- Proper declaration of expected exceptions via @Test(expected).
- Renamed SpEL ExpressionTestCase to AbstractExpressionTests.
- Formatting and test method naming conventions.
2014-02-08 17:24:11 +01:00
Sam Brannen f717b55035 Fix test bug related to legacy JUnit AssertionFailedError
AssertionFailedError was thrown by JUnit 3.8. Since RedirectViewTests
has been upgraded to JUnit 4, now standard java.lang.AssertionErrors are
thrown. Thus, attempting to catch an AssertionFailedError is futile.

Of course, since these tests have not been failing, it is likely a moot
point, but changing the try-catch blocks to catch a possible
AssertionError can't be a bad thing.
2014-02-08 16:14:26 +01:00
Sam Brannen 08842f3fdf Delete legacy JUnit 3.8 test from spring-test 2014-02-08 15:50:04 +01:00
Sam Brannen 2d5c5fc18e Delete legacy JUnit 3.8 test from spring-test 2014-02-08 15:49:07 +01:00
Juergen Hoeller 8c0e3040c2 Polishing 2014-02-07 18:06:13 +01:00
Juergen Hoeller 749b65b0b2 Polishing 2014-02-07 17:42:37 +01:00
Juergen Hoeller 99f9dce14a Fixed all List return types to ? instead of Object, restoring backwards compatibility with existing Spring 3.2.x based code and allowing easier casts to other element types
Also declaring findByExample generically based on the given example object's type.

Issue: SPR-11402
2014-02-07 17:39:55 +01:00
Juergen Hoeller 919d6ccb3b Actually log the cause of canRead/canWrite failures
Issue: SPR-11403
2014-02-07 17:27:17 +01:00
Juergen Hoeller 9a8f860318 Fixed broken link to jax-ws-commons website
Issue: SPR-11404
2014-02-07 17:24:47 +01:00
Juergen Hoeller 631b07aef8 Upgraded to Commons FileUpload 1.3.1 2014-02-07 17:23:31 +01:00
Sam Brannen de5b7a378b Fix grammar and update link in Javadoc for SimpleThreadScope 2014-02-07 12:27:35 +01:00
Sam Brannen f1d146f305 Merge pull request #457 from mebigfatguy/master
Fix typo in log output for SimpleThreadScope
2014-02-07 12:15:06 +01:00
Dave Brosius cdd2324ab5 fix log spelling typo 2014-02-06 19:58:20 -05:00
Rossen Stoyanchev 42d0470d94 Improve expanding in MvcUriComponentsBuilder
Before this change MvcUriComponentsBuilder could not create a
UriComponentsBuilder for methods where the mapping has a URI variable
and no matching method argument for it.

For example a URI variable may be in the type-level mapping but not
all methods may have an @PathVariable argument for it.

This fix addresses the shortcoming such that MvcUriComponentsBuilder
expands the method argument values available to it and leaves remaining
URI variables to be further expanded via UriComponents.expand().

Issue: SPR-11391
2014-02-06 16:55:19 -05:00
Rossen Stoyanchev bdb742b8db Polish MvcUriComponentsBuilder
Issue: SPR-11391
2014-02-06 16:55:19 -05:00
Juergen Hoeller 09e2e5897d Removed outdated hibernate3 references across the codebase
Issue: SPR-9028
2014-02-06 22:15:59 +01:00
Juergen Hoeller 2410e29dda Introduced OpenSessionInterceptor as a streamlined alternative to HibernateInterceptor
Issue: SPR-9028
2014-02-06 22:13:52 +01:00
Sam Brannen 7566ceb5f2 Fix minor typo in testing chapter 2014-02-06 21:47:42 +01:00
Sam Brannen 9a6252d715 Fix formatting in 'TCF support classes' section of ref
This commit fixes some formatting issues in the 'TestContext Framework
support classes' section of the reference manual that were introduced
in the conversion from DocBook to AsciiDoc.
2014-02-06 21:12:00 +01:00
Juergen Hoeller 426f52b393 Polishing 2014-02-06 20:35:59 +01:00
Juergen Hoeller 8c4e372558 Introduced SpringNamingPolicy for CGLIB
Issue: SPR-11398
2014-02-06 20:25:11 +01:00
Sam Brannen 522d136bbd Delete TODO that is now tracked in JIRA
Issue: SPR-11393
2014-02-06 14:12:03 +01:00
Rossen Stoyanchev f636ccb5eb Fix failing test 2014-02-05 22:02:59 -05:00
Rossen Stoyanchev 46c0e45130 Improve header processing in SimpMessagingTemplate
Headers provided to the SimpMessagingTemplate's convertAndSend methods
are now automatically moved into the "nativeHeaders" sub-map. This
ensures the headers will go out with the STOMP message and be received
by subscribers.

Issue: SPR-11387
2014-02-05 21:25:35 -05:00
Sam Brannen 624170f178 Introduce verify & reset methods in ADSEMockCtrl
This commit introduces static verify() and reset() methods in
AnnotationDrivenStaticEntityMockingControl for programmatic control
on the mock.

Issue: SPR-11395
2014-02-05 23:18:41 +01:00
Sam Brannen edb0b0e84b Merge pull request #455 from sdeleuze/SPR-11392
Fix EvalTagTests with locales other than english
2014-02-05 20:22:40 +01:00
Sam Brannen 81c259fe42 Explain mock scope in static method mocking aspect 2014-02-05 20:17:34 +01:00
Sam Brannen 67142dcb0a Polish Javadoc in @*ExceptionHandler 2014-02-05 20:15:50 +01:00
Sebastien Deleuze 261a863e8f Fix EvalTagTests with locales other than english
Fix testPrintFormattedScopedAttributeResult test in org.springframework.web.servlet.tags.EvalTagTests class by making an assertion which is not locale dependent.

Issue: SPR-11392
2014-02-05 18:01:57 +01:00
Sam Brannen 9fe9e27189 Explain after advice behavior in static method mock aspect
This commit makes it clear that mock verification will not occur if an
advised test method throws an exception.
2014-02-05 15:57:52 +01:00
Sam Brannen 76f3d6e501 Improve test coverage for AbstractMethodMockingControl
This commit improves the test coverage for AbstractMethodMockingControl
by introducing tests that verify expected behavior for:

 - reentrant method invocations via public methods
 - reentrant method invocations via private methods
 - test methods that do not set expectations or invoke playback()
 - test methods that throw exceptions

For a more complete discussion of "after" vs. "after returning" advice
within AbstractMethodMockingControl, see the Javadoc in the tests.
2014-02-05 15:41:47 +01:00
Sam Brannen 3a89bc4b26 Fix merge error in previous commit
Issue: SPR-11385
2014-02-04 23:27:55 +01:00
Sam Brannen 69a89b1bb0 Fix off-by-one regression in AbstractMethodMockingControl
This commit fixes the off-by-one regression accidentally introduced in
commit 55961544a7.

Specifically, this fix ensures that the correct recorded call is
indexed in the 'calls' list in the implementation of
AbstractMethodMockingControl.Expectations.nextCall().

In addition, this commit improves the Javadoc for
AbstractMethodMockingControl, @MockStaticEntityMethods, and
AnnotationDrivenStaticEntityMockingControl and introduces a proper
toString() implementation for the internal Expectations.Call class in
AbstractMethodMockingControl. Furthermore, code from the obsolete
Delegate test class has been inlined in
AnnotationDrivenStaticEntityMockingControlTests.

Issue: SPR-11385, SPR-10885
2014-02-04 23:14:39 +01:00
Juergen Hoeller 1cd5071e6a Use AtomicInteger instead of local synchronization around int field
Issue: SPR-11103
2014-02-04 17:45:03 +01:00
Juergen Hoeller 8a6b095204 Polishing
Issue: SPR-11386
2014-02-04 17:41:42 +01:00
Juergen Hoeller 6634c19e6a Related polishing
Issue: SPR-11386
2014-02-04 16:45:14 +01:00
Juergen Hoeller 60c1905cdd Introduced "spring.jdbc.getParameterType.ignore" property
Issue: SPR-11386
2014-02-04 16:44:08 +01:00
Rossen Stoyanchev 1a8629d408 Fix failing test 2014-02-03 21:44:13 -05:00
Sam Brannen d90a36170a Polish Javadoc for @MockStaticEntityMethods & its aspect 2014-02-03 23:47:02 +01:00
Sam Brannen b8ed2f4967 Ensure all tests are executed in the Gradle build
Prior to this commit several test classes named "*Test" were not
recognized as tests by the Gradle build. This is due to the configured
inclusion of '**/*Tests.*' which follows Spring's naming convention for
test classes.

This commit addresses this issue by:

 - Renaming real test classes consistently to "*Tests".
 - Renaming internal test classes to "*TestCase".
 - Renaming @WebTest to @WebTestStereotype.
 - Disabling broken tests in AnnoDrivenStaticEntityMockingControlTest.
 - Modifying the Gradle build configuration so that classes ending in
   either "*Tests" or "*Test" are considered test classes.

Issue: SPR-11384
2014-02-03 23:16:47 +01:00
Rossen Stoyanchev 1c5cab2a40 Add external entity test
Issue: SPR-11376
2014-02-03 16:57:03 -05:00
Juergen Hoeller f053f60630 Revised javadoc and related polishing
Issue: SPR-11383
2014-02-03 16:05:00 +01:00
Juergen Hoeller d55c22ec85 Upgraded to Apache HttpComponents HttpClient 4.3.2
Issue: SPR-11383
2014-02-03 16:02:05 +01:00
Juergen Hoeller f27304d785 Avoid repeated assignability check for raw class on fallback match, since AutowireCandidateResolver is only being called for basic type matches to begin with
Issue: SPR-9965
2014-02-01 19:28:40 +01:00
Juergen Hoeller 874a2a9ca2 Backwards-compatible handling of generic and raw collection converters
Issue: SPR-11369
2014-02-01 19:24:40 +01:00
Rossen Stoyanchev e6f4796779 Fix failing test 2014-02-01 10:46:51 -05:00
Juergen Hoeller 46b24dbd33 Polishing
Issue: SPR-11369
2014-02-01 12:15:01 +01:00
Juergen Hoeller 5f2429429f Defensively handle ServletRequestAttributes casting in requestDestroyed callback
Issue: SPR-11378
2014-02-01 11:04:36 +01:00