Commit Graph

5656 Commits

Author SHA1 Message Date
Rossen Stoyanchev
caf2af077a Polish MockHttpServletRequestBuilder 2012-10-17 11:22:06 -04:00
Sam Brannen
c579cd1ce9 Update changelog regarding major new testing features 2012-10-16 16:07:16 -04:00
Rossen Stoyanchev
dbcbdace9e Parameterize AsyncTask type 2012-10-15 12:17:39 -04:00
Rossen Stoyanchev
e98dc50f99 Fix issue in PatternsRequestCondition 2012-10-15 12:17:39 -04:00
Rossen Stoyanchev
300ab4537b Add Spring 32 methods to StandaloneMockMvcBuilder 2012-10-15 12:17:39 -04:00
Phillip Webb
9582085950 Add DefaultMessageCodesResolverTests
Add unit test for DefaultMessageCodesResolver
2012-10-15 10:06:34 -04:00
Sam Brannen
300d41840b Fix JDK7 method order-dependent issues in SRCCT
SpringRunnerContextCacheTests suffers from JDK7-related non-determinism
in values returned from Class#getDeclaredMethods(), which in turn
affects JUnit and its execution of @Test methods.

This commit addresses this issue by introducing an
OrderedMethodsSpringJUnit4ClassRunner that sorts the test methods
alphabetically, which is actually required for
SpringRunnerContextCacheTests to work properly.

Issue: SPR-9789
2012-10-13 20:29:59 +02:00
Sam Brannen
21ebbb9c02 Support session & request scoped beans in the TCF
This commit introduces RequestAndSessionScopedBeansWacTests which
verifies support for request and session scoped beans in the Spring
TestContext Framework (TCF).

This support was actually introduced as an intentional side effect of
the work performed for SPR-5243 through the addition of the new 
WebTestExecutionListener.

Issue: SPR-4588
2012-10-13 19:50:31 +02:00
Sam Brannen
0bb24f2922 Update documentation TODOs
Issue: SPR-9864
2012-10-13 18:43:50 +02:00
Phillip Webb
6adb49b7a9 Add StringToUUIDConverter
Conversion to and from UUID objects is now supported by the
DefaultConversionService.

Issue: SPR-9765
2012-10-12 14:47:19 -07:00
Phillip Webb
c8c0e827b4 Polish trailing whitespace 2012-10-12 14:47:19 -07:00
Juergen Hoeller
29d60448cd Polishing 2012-10-12 23:34:23 +02:00
Juergen Hoeller
a6ce821ad8 Made AutoProxyCreatorTests less dependent on container's own interrogation of FactoryBeans
Issue: SPR-9857
2012-10-12 23:34:22 +02:00
Juergen Hoeller
3cf5572ee8 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Reverted change for @Bean methods that declare FactoryBean as their return type: The effects of trying to create the FactoryBean to find out about its implementation type are too far-reaching. It's better to recommend declaring a specific return type in the method signature if you want the container to specifically react to your implementation type.

Issue: SPR-9857
2012-10-12 23:34:22 +02:00
Juergen Hoeller
0af9244571 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Includes a change for factory methods that declare their return type as FactoryBean: When asked for a specific type match (e.g. LoadTimeWeaverAware), we do check early singleton instances as well (reusing the instances that we create for getObjectType checks). This is necessary in order to make @Bean method introspection as capable as XML bean definition introspection, even in case of the @Bean method using a generic FactoryBean declaration for its return type (instead of the FactoryBean impl class).

Issue: SPR-9857
2012-10-12 23:34:21 +02:00
Juergen Hoeller
0f11920007 Only cache by-type lookups if configuration has been marked as frozen
Issue: SPR-9448
2012-10-12 23:34:20 +02:00
Juergen Hoeller
d7e2de019f Mention matching bean names in exception message in case of non-unique EntityManagerFactory lookup 2012-10-12 23:34:19 +02:00
Juergen Hoeller
538ce4747d Only cache by-type lookups if configuration has been marked as frozen
Issue: SPR-9448
2012-10-12 23:34:18 +02:00
Juergen Hoeller
3c59725b94 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Includes a change for factory methods that declare their return type as FactoryBean: When asked for a specific type match (e.g. LoadTimeWeaverAware), we do check early singleton instances as well (reusing the instances that we create for getObjectType checks). This is necessary in order to make @Bean method introspection as capable as XML bean definition introspection, even in case of the @Bean method using a generic FactoryBean declaration for its return type (instead of the FactoryBean impl class).

Issue: SPR-9857
2012-10-12 23:34:18 +02:00
Juergen Hoeller
cfdcb54711 Jaxb2Marshaller has non-synchronized access to the JAXBContext once initialized
Issue: SPR-9867
2012-10-12 23:34:17 +02:00
Juergen Hoeller
138fa8af0e OpDivide does not return a TypedValue for its operate result (consistent with OpMultiply)
Issue: SPR-9869
2012-10-12 23:34:16 +02:00
Juergen Hoeller
ff7dcec5f7 BeanWrapper does not fall back to String constructor if ConversionService attempt failed before
Issue: SPR-9865
2012-10-12 23:34:15 +02:00
Juergen Hoeller
65743936ff Provider injection into prototype beans works for method parameters as well
Issue: SPR-9630
2012-10-12 23:34:14 +02:00
Phillip Webb
3f1fb4eeea Merge pull request #155 from philwebb/SPR-9284
* SPR-9284:
  Allow MapToMap conversion to work when the target map does not have a default constructor (as long as a new map copy is not required).
  Polish trailing whitespace
2012-10-12 13:11:02 -07:00
Phillip Webb
38c4393592 Allow MapToMap conversion to work when the target map does not have a
default constructor (as long as a new map copy is not required).

Issue: SPR-9284
2012-10-12 13:10:07 -07:00
Phillip Webb
60afa5ead4 Polish trailing whitespace 2012-10-12 13:09:53 -07:00
Phillip Webb
ea8b1327b4 Merge pull request #136 from philwebb/SPR-9017
* SPR-9017:
  SpEL support for methods and properties on class …
  Remove trailing whitespace
2012-10-12 13:00:56 -07:00
Phillip Webb
d28592a6c6 SpEL support for methods and properties on class …
Update the ReflectiveMethodResolver and ReflectivePropertyAccessor
to allow methods and properties of java.lang.Class to be resolved
when the target object is a class.

Issue: SPR-9017
2012-10-12 13:00:56 -07:00
Phillip Webb
98808347ca Remove trailing whitespace 2012-10-12 13:00:55 -07:00
Chris Beams
27c83710b0 Merge pull request #166 from philwebb/SPR-9851
# By Phillip Webb
* SPR-9851:
  Prevent memory leaks with @Configuration beans
2012-10-12 12:56:25 -07:00
Phillip Webb
c8061393fb Prevent memory leaks with @Configuration beans
Refactor ConfigurationClassEnhancer to allow cglib caching of
generated classes.  Prior to this commit each enhanced @Configuration
class would consume permgen space when created.

The CallbackFilter and Callback Types are now defined as static final
members so that they can be shared by all enhancers.  Only the
callbackInstances remain specific to a @Configuration class and
these are not used by cglib as part of the cache key.

Issue: SPR-9851
2012-10-12 12:33:42 -07:00
Rossen Stoyanchev
365a42da64 Add file upload test to Spring MVC Test 2012-10-12 09:17:27 -04:00
Rossen Stoyanchev
dc01f088f7 Fix issue in message conversion
This change ensures that when the Accept and the Producible media types
are equally specific, we use the one from the Accept header, which may
for example carry a different charset.
2012-10-12 08:49:30 -04:00
Rossen Stoyanchev
f7943786de Polish Spring MVC Test code
Remove use of UriTemplate in MockMvcRequestBuilders.
Rely on UriComponentsBuilder instead.

Decode query params before setting them on MockHttpServletRequest.

Add more options to model result matching for the count of errors.

Ignore white spaces and comments when comparing XML.
2012-10-11 22:18:22 -04:00
Phillip Webb
1858ef10ff Tests for DelegatingDataSource Wrappers 2012-10-10 15:49:03 -07:00
Juergen Hoeller
1a6940dd05 Fixed test failure on CI server (classpath search failing for some reason)
Issue: SPR-9797
2012-10-11 00:35:04 +02:00
Juergen Hoeller
15bf31a09e ResourceDatabasePopulator etc 2012-10-11 00:35:03 +02:00
Juergen Hoeller
84b3f7106d Polishing along with 3.1.3 backport
Issue: SPR-9761
Issue: SPR-9762
2012-10-11 00:35:02 +02:00
Phillip Webb
69b380583a Merge pull request #134 from philwebb/SPR-9744
* SPR-9744:
  Improve annotation methods in TypeDescriptor
  Polish code and JavaDoc formatting
2012-10-10 15:17:02 -07:00
Phillip Webb
e543ffdfd7 Improve annotation methods in TypeDescriptor
- Use generic typing for getAnnotation()
- Add hasAnnoation() method
- Update existing code and tests to make use of changes

Issue: SPR-9744
2012-10-10 15:16:46 -07:00
Phillip Webb
23f089ff1e Polish code and JavaDoc formatting
- Remove trailing whitespace
- Apply consistent JavaDoc formatting
2012-10-10 15:16:46 -07:00
Juergen Hoeller
efd872e35a JPA persistence.xml files may use jar-file entries relative to the unit root (as per the JPA spec)
Issue: SPR-9797
2012-10-10 23:34:24 +02:00
Juergen Hoeller
92a92b7937 Minor changes along with 3.1.3 backport
Issue: SPR-9781
Issue: SPR-9784
2012-10-10 23:34:23 +02:00
Juergen Hoeller
014f7f0242 Changes along with 3.1.3 backport
Aside from minor polishing, this change sets the "systemProperties" and "systemEnvironment" beans at each factory level as well.

Issue: SPR-9756
Issue: SPR-9764
2012-10-10 23:34:22 +02:00
Juergen Hoeller
9eeb6f15e5 Minor changes along with 3.1.3 backport
Issue: SPR-9798
Issue: SPR-9804
2012-10-10 23:34:21 +02:00
Phillip Webb
e5cfe8a2c5 Merge pull request #154 from philwebb/SPR-9285
* SPR-9285:
  Chain exception cause on create failure
2012-10-10 14:05:56 -07:00
Phillip Webb
2e48656906 Chain exception cause on create failure
Propogate root cause of exceptions thrown from createCollection
and createMap.

Issue: SPR-9285
2012-10-10 14:03:02 -07:00
Rossen Stoyanchev
2748f2b8eb Remove deprecated methods in spring-test-mvc 2012-10-10 16:10:49 -04:00
Rossen Stoyanchev
e7a7f751b6 Prefix REST client test support classes w/ "MockRest"
Add "MockRest-" prefix to RequestMatchers and ResponseCreators to
make it easy to find classes with static imports with
Ctrl+Shift+T "MockRest" - similar to the "MockMvc"
prefix on the server-side.
2012-10-10 15:44:51 -04:00
Rossen Stoyanchev
d4fa5c0331 Fix NPE in AbstractMessageConverterMethodProcessor
Issue: SPR-9868
2012-10-10 09:00:43 -04:00