Commit Graph

279 Commits

Author SHA1 Message Date
Sam Brannen f7a849f9f4 [SPR-8386] AbstractContextLoader now adheres to the SmartContextLoader contract by verifying the existence of generated default resource locations. 2011-06-20 16:20:14 +00:00
Sam Brannen b00a6ccea5 [SPR-8386] polishing JavaDoc. 2011-06-20 14:33:08 +00:00
Sam Brannen 4b026756ae [SPR-7960] Documented inheritProfiles attribute of @ActiveProfiles. 2011-06-20 14:32:39 +00:00
Sam Brannen 95ae6344c5 [SPR-8386] refining JavaDoc for MergedContextConfiguration and related classes. 2011-06-20 01:17:25 +00:00
Sam Brannen 4d27cde6b7 [SPR-8386] fleshing out JavaDoc for SmartContextLoader and related classes. 2011-06-19 22:41:18 +00:00
Sam Brannen 427f31cb9c polishing 2011-06-19 17:40:08 +00:00
Sam Brannen a77cf0f652 [SPR-8395][SPR-8386] AnnotationConfigContextLoader now generates a list of default configuration classes by finding all non-private, non-final, static, inner classes of the test class that are annotated with @Configuration; updated JavaDoc in AbstractGenericContextLoader and AnnotationConfigContextLoader to reflect changes resulting from the SmartContextLoader integration. 2011-06-19 17:36:25 +00:00
Sam Brannen c070a4b0a4 polishing Javadoc 2011-06-19 14:07:59 +00:00
Sam Brannen d904bcbf03 [SPR-8386] AnnotationConfigContextLoader now only considers static inner classes annotated with @Configuration when generating default configuration classes. 2011-06-18 19:58:53 +00:00
Sam Brannen 46639c5a1d [SPR-8386] Polishing SmartContextLoader SPI; AnnotationConfigContextLoader now only considers static inner classes annotated with @Configuration as configuration classes. 2011-06-18 19:45:39 +00:00
Sam Brannen 7dd6932910 polishing developer documentation 2011-06-17 21:51:01 +00:00
Sam Brannen 9a56deb283 [SPR-8386] SmartContextLoader enhancements:
- introduced processContextConfigurationAttributes() method in SmartContextLoader SPI
- refactored AnnotationConfigContextLoader, AbstractContextLoader, AbstractGenericContextLoader, ContextLoaderUtils, and TestContext implementations to take advantage of the SmartContextLoader SPI, MergedContextConfiguration, and ContextConfigurationAttributes
- deleted ResourceTypeAwareContextLoader
- deleted ContextLoaderUtils.LocationsResolver and implementations
- moved context key generation from TestContext to MergedContextConfiguration
2011-06-17 21:49:06 +00:00
Chris Beams 2d68b726b5 Add syntax highlighting to Javadoc where necessary
Issue: SPR-8426
2011-06-12 06:56:17 +00:00
Juergen Hoeller 11f90023dc shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 12:50:55 +00:00
Juergen Hoeller c60511bf04 shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 09:58:15 +00:00
Juergen Hoeller fc11102e34 updated dependencies 2011-06-08 22:51:21 +00:00
Sam Brannen 9c3c1c64b3 [SPR-8386] polishing JavaDoc 2011-06-03 22:51:53 +00:00
Sam Brannen dbe96b5cf9 [SPR-7326] MergedContextConfiguration now ensures that it holds non-null arrays with proper semantics for TestContext's cache key generation. 2011-06-03 22:46:43 +00:00
Sam Brannen 3f58da1cd6 [SPR-7326] Added unit tests to verify proper semantics of TestContext's cache key generation. 2011-06-03 21:38:05 +00:00
Sam Brannen da41c9bb11 polishing 2011-06-03 16:19:41 +00:00
Sam Brannen 0d4469d8e3 Suppressing warnings for deprecation of SimpleJdbcTemplate; polishing JavaDoc; using TestNG assertions in TestNG tests. 2011-06-03 14:10:16 +00:00
Sam Brannen 266e1096ce polishing 2011-06-03 13:40:45 +00:00
Sam Brannen 2b17ee0911 [SPR-6184] AnnotationConfigContextLoader now defines "$ContextConfiguration" as the resource suffix for generated default @Configuration class names. 2011-06-03 13:39:15 +00:00
Sam Brannen 39583d23fd [SPR-6184] AnnotationConfigContextLoader now defines "$ContextConfiguration" as the resource suffix for generated default @Configuration class names. 2011-06-03 13:11:06 +00:00
Sam Brannen 2913964b41 [SPR-7960][SPR-8386] Supporting declarative configuration of bean definition profiles in the TestContext framework:
- TextContext now works with MergedContextConfiguration instead of locations and loader
- TextContext now builds context caching key from MergedContextConfiguration
- Test context caching is now based on locations, classes, active profiles, and context loader
- TextContext now delegates to SmartContextLoader or ContextLoader as appropriate
- AbstractContextLoader now implements SmartContextLoader
- AbstractGenericContextLoader now sets active profiles in the GenericApplicationContext 
- Introduced integration tests for profile support in the TCF for both XML and annotation config
2011-06-02 17:51:37 +00:00
Sam Brannen ac735d73ac [SPR-7960][SPR-8386] First draft of SmartContextLoader SPI, MergedContextConfiguration, and ContextConfigurationAttributes. 2011-06-02 14:45:22 +00:00
Sam Brannen ff2a603f2f [SPR-7960] Trimming profiles for good measure. 2011-06-01 15:04:34 +00:00
Sam Brannen 24a97805ef [SPR-7960] Renamed @ActivateProfiles to @ActiveProfiles and fleshed out JavaDoc. 2011-06-01 14:40:53 +00:00
Sam Brannen 3a2afde41d [SPR-7960] Renamed resolveActivatedProfiles() to resolveActiveProfiles(). 2011-06-01 12:59:47 +00:00
Sam Brannen f64344b296 [SPR-7960] resolveActivatedProfiles() now resolves a unique set of activated profiles 2011-06-01 12:56:50 +00:00
Sam Brannen 6981ee566c [SPR-7960] No longer tracking empty activated profiles. 2011-05-31 22:29:14 +00:00
Sam Brannen c7473f9124 [SPR-7960] No longer tracking empty activated profiles. 2011-05-31 22:12:53 +00:00
Sam Brannen 0067618b35 [SPR-7960] Initial support for @ActivateProfiles in tests. 2011-05-30 22:00:12 +00:00
Sam Brannen f5a39ae7ff [SPR-7960] Initial support for @ActivateProfiles in tests. 2011-05-30 21:59:12 +00:00
Chris Beams c51c340881 Update MockEnvironment / MockPropertySource types
Reflecting signature changes in getProperty() methods
2011-05-06 18:57:41 +00:00
Sam Brannen ddc9bbb555 [SPR-6184] Simplifying ContextLoader implmementation:
- Removed AbstractGenericContextLoader's createGenericApplicationContext() method.
- AnnotationConfigContextLoader now uses an AnnotatedBeanDefinitionReader instead of working with an AnnotationConfigApplicationContext.
- AnnotationConfigContextLoader now uses the supplied GenericApplicationContext to load configuration classes.
2011-05-06 12:05:56 +00:00
Sam Brannen 68b4687311 [SPR-6184] completed JavaDoc for @ContextConfiguration. 2011-04-10 23:20:05 +00:00
Sam Brannen a16f3ba9dc [SPR-6184] completed JavaDoc for AnnotationConfigContextLoader; polished JavaDoc for other concrete context loaders. 2011-04-09 23:24:34 +00:00
Sam Brannen 174bf58308 [SPR-6184] added tests to verify support for @Configuration classes with TestNG; simplified existing TestNG tests using Spring 3.0 and 3.1 features. 2011-04-09 22:44:53 +00:00
Sam Brannen 522a879496 polishing 2011-04-09 21:40:08 +00:00
Sam Brannen 0584c26b2c [SPR-6184] additional sanity check tests analogous to those developed for [SPR-3896]. 2011-04-09 21:39:42 +00:00
Sam Brannen 22072b2414 [SPR-6184] polishing 2011-04-09 14:46:49 +00:00
Sam Brannen ef79d7cc8a [SPR-6184] Fleshed out JavaDoc for ResourceTypeAwareContextLoader and ContextLoaderUtils. 2011-04-09 14:34:16 +00:00
Sam Brannen 03961a81d6 Updated Eclipse code formatter settings for use with STS 2.6. Specifically, format_javadoc_comments=false, which requires that JavaDoc be formatted manually. 2011-04-09 13:31:02 +00:00
Sam Brannen c50d38ef8d [SPR-6184] Introduced ResourceType enum for context loaders; documented tests. 2011-04-08 22:57:45 +00:00
Sam Brannen eba33b6156 polishing 2011-04-04 22:06:05 +00:00
Sam Brannen 4dcc79d6eb [SPR-6184] Implemented recursive search for configuration classes; introduced LocationsResolver strategy in ContextLoaderUtils with ResourcePathLocationsResolver and ClassNameLocationsResolver implementations. 2011-04-03 23:10:28 +00:00
Sam Brannen f3d125626d [SPR-6184] Refactored internals of ContextLoaderUtils; @Ignore'd broken test. 2011-04-03 17:45:20 +00:00
Sam Brannen 293baeeb88 [SPR-6184] Updated TODOs. 2011-04-03 17:23:57 +00:00
Sam Brannen 523c090551 [SPR-6184] Added DefaultConfigClassInheritedTests to verify proper recursive search for configuration classes configured via @ContextConfiguration. This test is currently failing (as expected) and therefore @Ignore'd. 2011-04-03 17:22:43 +00:00
Sam Brannen 70f883303f Removed unnecessary declaration of @TestExecutionListeners. 2011-04-03 17:20:02 +00:00
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 10640233dc [SPR-6184] Initial draft of the new AnnotationConfigContextLoader. 2011-03-29 23:42:59 +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 fa48a7b3a3 Updating JUnit and TestNG versions for IDEs and Maven. 2011-03-28 19:59:09 +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 657b145ea2 [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-28 14:43:01 +00:00
Sam Brannen c736e6b873 [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:45:43 +00:00
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +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
Sam Brannen b130a36af7 [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1. 2010-12-30 08:00:58 +00:00
David Syer b109a07fd9 SPR-7705: re-order rules and befores 2010-11-17 17:27:03 +00:00
Chris Beams f480333d31 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.
2010-10-25 19:48:20 +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
Ben Hale 7730e76c06 Publishing license and notice files 2010-08-23 13:17:31 +00:00
Arjen Poutsma dbfa049e1e Prepping for 3.0.5 2010-08-19 11:04:04 +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
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller bd1b559d47 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:05:21 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Chris Beams 051b5f4f4f removed duplicate junit and aspectjweaver dependencies 2010-03-24 10:09:58 +00:00
Sam Brannen 69cbadf7e9 [SPR-6918] Now verifying support for @Value in conjunction with the Spring TestContext Framework. 2010-03-19 12:57:17 +00:00
Juergen Hoeller ac5c75690a fixed test failures 2010-03-12 20:55:44 +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
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Costin Leau 8d0bb00188 + make use or property placeholders inside template.mf 2010-02-19 09:43:22 +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
Chris Beams 0f7f749ada Updated Eclipse .classpath to aspectj 1.6.8 2010-02-04 13:45:14 +00:00
Costin Leau 0fd4a45070 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml
2010-02-04 11:46:21 +00:00
David Syer b077d5ba97 SPR-6678: fix poms for 3.0.1 2010-01-13 11:07:08 +00:00
Juergen Hoeller 31144591b0 revised javadoc (SPR-5720) 2009-12-09 15:24:47 +00:00
David Syer 1202f67cc8 SPR-5327: tweak the ivy.xml so that commons-logging is a separate configuration. It already comes out as optional in the generated poms (including core), which isn't great, but I can't see what is causing that 2009-12-04 18:25:31 +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
Sam Brannen 1b92a2fae1 [SPR-6124] Verified that timed transactional tests fail with the TestNG integration in the TestContext framework. 2009-10-26 13:38:59 +00:00
Sam Brannen 02dfe94396 [SPR-6128] Verified that claims raised in this issue no longer apply. 2009-10-26 13:00:04 +00:00
Juergen Hoeller 87b2f23692 updated version ranges for javax.el and javax.inject 2009-10-23 17:26:12 +00:00