-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add Before/After attributes for unit-test. #39
Conversation
Hi. Why do you think this feature is necessary? What's the use case? |
The project is a very good quick replace solution for specflow when we moved to dotnet core. |
This framework does not intend to replace specflow. That alone will not be enough to have this feature considered. I hope this does not come as a big frustration. |
For those unit-test which need initialization or destruction functions, I will not feel frustrated if you reject the feature, then I will use my forked project. |
Thanks for clarifying! Initialization code should go into constructor of the tester class (one that derives from At this point, I would have to restrain from merging this feature. If I see a need for such functionality in the future, clearly from feature/scenario (Gherkin) test standpoint, then I will come back to this. But if you think I'm misunderstanding something, please do let me know. |
Output is null because I assign to Output after constructor executes. But, if you want Output to be not null, simply add e.g.: public sealed class MyFeature : Feature
{
public MyFeature(ITestOutputHelper output2)
{
// output2 is not null, Output is null.
var type = output2.GetType();
}
} |
Closing as out of scope. Thanks anyway for the effort! |
Sorry for empty description.
Those are hooks attributes for unit-test.
please reference for specflow http://specflow.org/documentation/Hooks/