Commit Graph

91 Commits

Author SHA1 Message Date
Sam Brannen
5373b43a53 [SPR-6184] Extracted ContextLoader resolution functionality from TestContext into a new ContextLoaderUtils utility class. 2011-04-03 17:00:45 +00:00
Sam Brannen
ad9c858bd2 [SPR-6184] Introduced ResourceTypeAwareContextLoader interface and removed dependency on AnnotationConfigContextLoader in TestContext. 2011-04-03 16:37:24 +00:00
Sam Brannen
a60487655c polishing JavaDoc 2011-04-03 15:26:13 +00:00
Sam Brannen
744facbf64 [SPR-6184] Simplified AnnotationConfigContextLoader in TestContext. 2011-04-03 15:16:13 +00:00
Sam Brannen
dd4d6e63ae [SPR-6184] AnnotationConfigContextLoader now generates a default configuration class name; fleshed out documentation of AnnotationConfigContextLoader; introduced sub-package and suite for configuration class tests. 2011-04-03 14:37:29 +00:00
Sam Brannen
ec1b230ae5 [SPR-6184] AnnotationConfigContextLoader now calls AnnotationConfigApplicationContext's register(Class<?>...) method in one go, via var-args. 2011-03-31 00:00:31 +00:00
Sam Brannen
732493951e [SPR-6184] AnnotationConfigContextLoader now extends AbstractGenericContextLoader; added new extension points to AbstractGenericContextLoader. 2011-03-30 23:50:19 +00:00
Sam Brannen
334e4f2212 [SPR-6184] Initial draft of the new AnnotationConfigContextLoader. 2011-03-29 23:38:37 +00:00
Sam Brannen
b50338fd32 [SPR-6184] Work in Progress 2011-03-28 21:45:14 +00:00
Sam Brannen
726564c84d Polishing and fixed broken support for @IfProfileValue in AbstractJpaTests (even though it's deprecated). 2011-03-28 17:23:48 +00:00
Sam Brannen
c736e6b873 [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:45:43 +00:00
Sam Brannen
6926e0f563 Suppressing warnings, polishing JavaDoc, etc. 2011-02-08 22:50:45 +00:00
Chris Beams
b3ff9be78f M1 cut of environment, profiles and property work (SPR-7508)
Decomposed Environment interface into PropertySources, PropertyResolver
objects

    Environment interface and implementations are still present, but
    simpler.

    PropertySources container aggregates PropertySource objects;
    PropertyResolver provides search, conversion, placeholder
    replacement. Single implementation for now is
    PropertySourcesPlaceholderResolver

Renamed EnvironmentAwarePropertyPlaceholderConfigurer to
PropertySourcesPlaceholderConfigurer

    <context:property-placeholder/> now registers PSPC by default, else
    PPC if systemPropertiesMode* settings are involved

Refined configuration and behavior of default profiles

    See Environment interface Javadoc for details

Added Portlet implementations of relevant interfaces:

    * DefaultPortletEnvironment
    * PortletConfigPropertySource, PortletContextPropertySource
    * Integrated each appropriately throughout Portlet app contexts

Added protected 'createEnvironment()' method to AbstractApplicationContext

    Subclasses can override at will to supply a custom Environment
    implementation.  In practice throughout the framework, this is how
    Web- and Portlet-related ApplicationContexts override use of the
    DefaultEnvironment and swap in DefaultWebEnvironment or
    DefaultPortletEnvironment as appropriate.

Introduced "stub-and-replace" behavior for Servlet- and Portlet-based
PropertySource implementations

    Allows for early registration and ordering of the stub, then
    replacement with actual backing object at refresh() time.

    Added AbstractApplicationContext.initPropertySources() method to
    support stub-and-replace behavior. Called from within existing
    prepareRefresh() method so as to avoid impact with
    ApplicationContext implementations that copy and modify AAC's
    refresh() method (e.g.: Spring DM).

    Added methods to WebApplicationContextUtils and
    PortletApplicationContextUtils to support stub-and-replace behavior

Added comprehensive Javadoc for all new or modified types and members

Added XSD documentation for all new or modified elements and attributes

    Including nested <beans>, <beans profile="..."/>, and changes for
    certain attributes type from xsd:IDREF to xsd:string

Improved fix for detecting non-file based Resources in
PropertiesLoaderSupport (SPR-7547, SPR-7552)

    Technically unrelated to environment work, but grouped in with
    this changeset for convenience.

Deprecated (removed) context:property-placeholder
'system-properties-mode' attribute from spring-context-3.1.xsd

    Functionality is preserved for those using schemas up to and including
    spring-context-3.0.  For 3.1, system-properties-mode is no longer
    supported as it conflicts with the idea of managing a set of property
    sources within the context's Environment object. See Javadoc in
    PropertyPlaceholderConfigurer, AbstractPropertyPlaceholderConfigurer
    and PropertySourcesPlaceholderConfigurer for details.

Introduced CollectionUtils.toArray(Enumeration<E>, A[])

Work items remaining for 3.1 M2:

    Consider repackaging PropertySource* types; eliminate internal use
    of SystemPropertyUtils and deprecate

    Further work on composition of Environment interface; consider
    repurposing existing PlaceholderResolver interface to obviate need
    for resolve[Required]Placeholder() methods currently in Environment.

    Ensure configurability of placeholder prefix, suffix, and value
    separator when working against an AbstractPropertyResolver

    Add JNDI-based Environment / PropertySource implementatinos

    Consider support for @Profile at the @Bean level

    Provide consistent logging for the entire property resolution
    lifecycle; consider issuing all such messages against a dedicated
    logger with a single category.

    Add reference documentation to cover the featureset.
2011-01-03 09:04:34 +00:00
David Syer
b109a07fd9 SPR-7705: re-order rules and befores 2010-11-17 17:27:03 +00:00
Juergen Hoeller
3f0462510e getTestExecutionListeners() returns actual List which allows for iteration as well as modification (SPR-7595) 2010-10-02 01:05:40 +00:00
Juergen Hoeller
aac2de9221 avoid ConcurrentModificationException when iterating attribute names (SPR-7557) 2010-10-01 22:27:34 +00:00
Juergen Hoeller
0aec5efb56 polishing 2010-08-15 23:01:10 +00:00
Juergen Hoeller
5b0448c609 MockMultipartHttpServletRequest pre-defines method "POST" and content type "multipart/form-data" 2010-08-15 22:46:15 +00:00
Juergen Hoeller
1841b14b21 consistent mocks between modules 2010-08-15 22:02:40 +00:00
Juergen Hoeller
bd1b559d47 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:05:21 +00:00
Juergen Hoeller
795a5e02cd polishing 2010-03-12 20:45:02 +00:00
Juergen Hoeller
bb75662a7e @Transactional qualifiers work in unit tests as well (SPR-6892) 2010-03-12 20:44:41 +00:00
Sam Brannen
80b8fb8b83 [SPR-6879] @DirtiesContext is now an @Inherited annotation. 2010-02-23 17:43:00 +00:00
Juergen Hoeller
59360f4f65 added warning about pointing to a custom transaction manager bean (SPR-5174) 2010-02-04 16:47:57 +00:00
Juergen Hoeller
31144591b0 revised javadoc (SPR-5720) 2009-12-09 15:24:47 +00:00
Juergen Hoeller
613b4d182b avoid potential NPE (SPR-6300) 2009-11-12 13:42:07 +00:00
Costin Leau
9a111e504f SPR-6194
+ add setter for servlet minor version to MockServletContext
2009-11-09 11:51:30 +00:00
Juergen Hoeller
09e6a85edd fixed overview files 2009-09-25 08:47:18 +00:00
Sam Brannen
f1bfcf0d25 [SPR-6104] @TestExecutionListeners now supports a 'listeners' alias for its existing 'value' attribute. 2009-09-13 13:55:34 +00:00
Sam Brannen
f9f9b431a6 [SPR-4643] SpringJUnit4ClassRunner now optionally calls JUnit 4.7's BlockJUnit4ClassRunner.withRules() method using reflection in order to provide backward compatibility with JUnit 4.5 and 4.6. 2009-09-07 21:03:32 +00:00
Sam Brannen
2dee54b78a [SPR-4702] now updating TestContext state before calling before/after test class life cycle callbacks. 2009-09-01 17:33:12 +00:00
Sam Brannen
984504735e [SPR-6011] SpringJUnit4ClassRunner once again supports collective timeouts for repeated tests. 2009-08-28 17:28:25 +00:00
Arjen Poutsma
66a799552f SPR-2784: Support MultipartFile-array property 2009-08-28 09:15:19 +00:00
Sam Brannen
a07da0d950 [SPR-6043] @NotTransactional is now deprecated 2009-08-26 23:23:07 +00:00
Sam Brannen
8fb53c801e [SPR-5995] Updated documentation regarding compatibility with JUnit 4.5, 4.6, and 4.7. 2009-08-26 13:13:06 +00:00
Sam Brannen
da3eb580f6 [SPR-5995] Renamed makeNotifier() to springMakeNotifier() in order to allow compatibility with JUnit 4.5, 4.6, and 4.7. 2009-08-26 12:37:59 +00:00
Sam Brannen
9f9f2349cd polishing 2009-08-24 12:14:57 +00:00
Sam Brannen
77821845a7 [SPR-4702] Updated JavaDoc regarding before/after test class lifecycle callbacks. 2009-08-22 21:50:02 +00:00
Sam Brannen
9eb19ac816 Polishing test annotation declarations and JavaDoc. 2009-08-21 11:44:38 +00:00
Sam Brannen
42638585b5 [SPR-5963] Upgraded to JUnit 4.7 2009-08-11 10:12:20 +00:00
Juergen Hoeller
a7a97316e7 turned requestedSessionId into a settable property 2009-08-05 22:01:46 +00:00
Sam Brannen
ee1938eb74 [SPR-5315][SPR-5699] Reverted changes to TransactionalTestExecutionListener: transactions are no longer automatically flushed before rolling back. 2009-07-21 11:03:59 +00:00
Sam Brannen
b2c723a76e [SPR-5916] polishing. 2009-07-20 12:14:56 +00:00
Sam Brannen
fc79d98b6a [SPR-5916] ContextLoader class is now inherited from class hierarchy if not specified explicitly via @ContextConfiguration's loader attribute on the current test class. 2009-07-20 09:35:33 +00:00
Sam Brannen
696d78c144 [SPR-5914] ProfileValueUtils now properly ensures that class-level usage of @IfProfileValue overrides method-level usage. 2009-07-10 11:45:31 +00:00
Sam Brannen
2b869d57f2 [SPR-5902] JavaDoc polishing. 2009-07-06 22:36:47 +00:00
Sam Brannen
eef6fd3f09 [SPR-5640] polishing 2009-07-06 19:24:34 +00:00
Sam Brannen
c254f389c0 [SPR-5640] Added support for marking the test application context as 'dirty' after each test method within a given test class via the new DirtiesContext.classMode() attribute. 2009-07-06 19:17:16 +00:00
Sam Brannen
51b8b99dfc [SPR-4702] JavaDoc updates 2009-07-06 13:41:01 +00:00
Sam Brannen
8dec6af038 [SPR-4702] Added support for @DirtiesContext at the test class level. 2009-07-06 12:58:56 +00:00