-
Notifications
You must be signed in to change notification settings - Fork 11
Automatically register SpecFlow bindings #25
Automatically register SpecFlow bindings #25
Conversation
Please squash when accepted :) |
You move fast! 😄 Let me check this tonight, I think there was a reason for using the Thanks for your contribution! |
it's still doing But please do check :) Thanks for the great library! |
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.
Looks ok, but I need to check what happens if users already added the piece of initialisation code (and this change would add those bindings again). This comment is a reminder to @mbhoek to check it.
EDIT: and ofcourse simultaneously @304NotModified updated the PR, so I need to recheck 😃
luckily I didn't do a force push, so you could check the latest commit :) |
No crash at my side, but not sure if there goes some else wrong |
To be clear, if you leave this: foreach (var type in typeof(TestDependencies).Assembly.GetTypes().Where(t => Attribute.IsDefined(t, typeof(BindingAttribute))))
{
services.AddSingleton(type);
} Then still all tests are green. |
@@ -5,5 +5,9 @@ namespace SolidToken.SpecFlow.DependencyInjection | |||
[AttributeUsage(AttributeTargets.Method)] | |||
public class ScenarioDependenciesAttribute : Attribute | |||
{ | |||
/// <summary> | |||
/// Automatically register all SpecFlow bindings |
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.
Prefer ending all <summary>
comments with .
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.
👍
* Search for BindingAttribute inside lib * add AutoRegisterBindings Contributor: @304NotModified +semver: feature
Fixes #24, fixes #7