Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for @Bean 'lite' mode and annotated class support in the TestContext Framework [SPR-9401] #14037

Closed
3 tasks done
spring-projects-issues opened this issue May 11, 2012 · 4 comments
Assignees
Labels
in: test Issues in the test module type: documentation A documentation task type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 11, 2012

Sam Brannen opened SPR-9401 and commented

Background

#13690 raised valid concerns about exactly what kinds of classes are supported in the TestContext Framework (TCF) with regard to the classes attribute in @ContextConfiguration.

In addition, the issues that users ran into were partly due to lacking documentation of the so-called @Bean lite mode.

Status Quo

Classes that are declared via @ContextConfiguration(classes=...) (either explicitly or implicitly) are required to be what we call annotated classes.

Annotated classes include:

  • annotated stereotype components (i.e., classes annotated with @Component, @Service, etc.)
  • @Configuration classes
  • any class that contains @Bean annotated methods
    • these are effectively annotated factory bean methods running in lite mode

However, the current documentation typically refers to configuration classes when it should in fact refer to and explain what is meant by annotated classes and lite mode.


Deliverables

  1. Update the Javadoc for @Bean to better explain the semantics of lite mode.
  2. Update all Javadoc in the TCF to explain and refer to annotated classes instead of configuration classes.
  3. Update the Testing chapter in the reference manual to refer to annotated classes instead of configuration classes.

Affects: 3.1 GA

Issue Links:

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Updated the JavaDoc for @Bean.

See the updated documentation on GitHub.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

From commit on GitHub.

*Improve documentation of annotated class support in the TCF*

Updated all Javadoc in the Spring TestContext Framework (TCF) to explain
and refer to 'annotated classes' instead of 'configuration classes'.

Specifically, @ContextConfiguration now explicitly defines what is meant
by 'annotated classes', and various other classes now refer to this
definition. Otherwise, the term 'configuration class' has simply been
replaced with 'annotated class'.

Also deleted cross references to deprecated JUnit 3.8 classes and
formatted Javadoc in general for greater readability.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

From GitHub commit:

*Update documentation of 'annotated class' support in the TCF*

Updated the testing chapter of the reference manual to refer to 
'annotated classes' instead of 'configuration classes' where 
appropriate.

Also revised the content and examples in the @ContextConfiguration 
annotation section, mentioned Gradle, and reformatted the entire text.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented May 18, 2012

Sam Brannen commented

If you are following this issue, you may also be interested in #14061.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: documentation A documentation task type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants