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
Support context parameters on Before/After methods, FeatureContainer #779
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a027390
Added scenario: Inject FeatureContext into a BeforeFeature hook
gasparnagy a52eadd
first dummy implementation to make the scenario pass (runtime tests f…
gasparnagy c0321b2
Use bindingInstanceResolver to resolve parameters
gasparnagy d6993c1
make unit tests pass
gasparnagy feb4aad
Add unit tests for what we have so far
gasparnagy 1c62dce
support for resolving hook parameters from scenario context
gasparnagy 95fec57
better then step for the scenarios
gasparnagy 840ab38
fix unit test error
gasparnagy 8089d25
added failing test for resolving objects from feature container
gasparnagy 397a82a
refactor ScenarioContext
gasparnagy d25281a
Implement FeatureContainer
gasparnagy 0b6f0e5
move binding culture initialization to FeatureContext
gasparnagy c211e05
fix featurecontext resolution from scenario container
gasparnagy b3fbf54
Refactor scenario and feature context and remove displose hack that w…
gasparnagy b90b61e
fix unit test failure
gasparnagy 0e15ec9
Make InternalContextManager to IObjectContainer reference more explicit
gasparnagy fd5fa6b
rename IBindingInstanceResolver to ITestObjectResolver (breaking chan…
gasparnagy File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,26 @@ | |
|
||
namespace TechTalk.SpecFlow.Infrastructure | ||
{ | ||
//TODO: rename this to ITestObjectResolver | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you want to fix this todo as part of this PR? |
||
/// <summary> | ||
/// Resolves user created test objects from different scopes (scenario, feature, test thread). | ||
/// </summary> | ||
/// <remarks> | ||
/// <para>Notes to the implementors:</para> | ||
/// <para> | ||
/// The test objects might be dependent on particular SpecFlow infrastructure, therefore the implemented | ||
/// resolution logic should support resolving the following objects (from the provided SpecFlow container): | ||
/// <see cref="ScenarioContext"/>, <see cref="FeatureContext"/>, <see cref="TestThreadContext"/> and | ||
/// <see cref="IObjectContainer"/> (to be able to resolve any other SpecFlow infrastucture). | ||
/// </para> | ||
/// <para> | ||
/// If the resolved (top level) object implements <see cref="IContainerDependentObject"/>, the method | ||
/// <see cref="IContainerDependentObject.SetObjectContainer"/> must be called, passing in the original | ||
/// SpecFlow container. (The <see cref="Steps"/> base class needs this.) | ||
/// </para> | ||
/// </remarks> | ||
public interface IBindingInstanceResolver | ||
{ | ||
object ResolveBindingInstance(Type bindingType, IObjectContainer scenarioContainer); | ||
object ResolveBindingInstance(Type bindingType, IObjectContainer scenarioContainer); //TODO: rename parameter to "container" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you want to fix this todo as part of this PR? |
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason newDisposable is a IDisposable and not an IObjectContainer?