Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Add sample code for child contexts in test methods #110

Merged
merged 1 commit into from
Oct 17, 2015

Conversation

dsyer
Copy link
Contributor

@dsyer dsyer commented Oct 16, 2015

I blended my original ideas with Thomas's comments and got something
that works with a throwaway context per method if it detects either
@ChildSpringApplication or @ChildTestProperties (separate annotations
needed because the existing analogs at the type level do not
support being added to methods).

There's some reflection hackery to get the TestContext in a MethodRule,
but possibly that would be unnecessary if this feature was supported
in SpringMethodRule.

I blended my original ideas with Thomas's comments and got something
that works with a throwaway context per method if it detects either
@ChildSpringApplication or @ChildTestProperties (separate annotations
needed because the existing analogs at the type level do not
support being added to methods).

There's some reflection hackery to get the TestContext in a MethodRule,
but possibly that would be unnecessary if this feature was supported
in SpringMethodRule.
@sbrannen sbrannen self-assigned this Oct 17, 2015
sbrannen added a commit that referenced this pull request Oct 17, 2015
Add sample code for child contexts in test methods
@sbrannen sbrannen merged commit 73db0e2 into spring-attic:master Oct 17, 2015
@sbrannen
Copy link
Contributor

Thanks, Dave.

I'll take a look at it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants