Closed mbhoek closed 1 month ago
Hi @mbhoek,
Thank you for your great effort. Could you kindly give an update?
@gasparnagy Status update: the plugin in this PR is a direct copy of my original plugin with the namespaces adjusted. As such, it works and is ready to be merged.
However I wanted to include (new) unit tests and align the way the plugin works with how the Autofac plugin handles Global/Feature/Scenario dependencies. This has been a long standing wish of mine, because I'm not completely satisfied with how the original plugin does Feature/Scenario dependencies. It would also introduce some breaking changes in how the plugin works, which make sense to do now because we're including it in Reqnroll for the first time.
Unfortunately this turned out into a complete rewrite of the plugin, which is taking a lot longer than expected (also due to limited time). I do like where it's heading though so I would like to keep working on it. I also understand that the community is getting anxious/is waiting for this plugin, so I would like to discuss what the best next step is.
How about a simple first pass that aligns with the current, and then the second version with the breaking changes?
Could have a common interface but different names so people can adopt when they have bandwidth
I guess that's a solution and maybe the preferred one for Reqnroll's progression.
@gasparnagy Are you okay with me submitting this PR without the unit tests and aligning with Autofac's scopes (i.e. the first two items on this PRs todo list)? I could then introduce the breaking changes for the v2 milestone you already created.
@mbhoek sure. let's include it without the bigger changes and we will add them later
Just to chip in, could you consider a shorter nuget package name? For example, lots of package authors use <name>.DependencyInjection
For example:
Xunit.DependencyInjection
Npgsql.DependencyInjection
EventFlow.DependencyInjection
RavenDB.DependencyInjection
and so on.
@robertcoltheart The naming here is really painful, because "DependencyInjection" is such a generic name, but the correct name is too long... We have discussed about it here and decided on this long name. In our case Reqnroll.DependencyInjection
is quite misleading, because Reqnroll has its own dependency injection solution. I think there is no good solution here. Let's stick to the looooong name for now. 😟
@mbhoek I have fixed the merging problems and ported the docs from https://github.com/solidtoken/SpecFlow.DependencyInjection#usage. I will merge this PR now, as I would like to make a release. We can keep improving it of course. I have made some unit tests for the Autofac plugin (see https://github.com/reqnroll/Reqnroll/blob/main/Tests/Reqnroll.PluginTests/Autofac/AutofacPluginTests.cs), maybe based on that we can also make some for this. But let's keep that for another PR.
Thx for the contribution!
Thanks again for taking the time to take this across the finish line @gasparnagy -- wish I could've been more helpful, but glad that the plugin is now part of Reqnroll! 👍
Thanks to both of you, @gasparnagy any ETA for the nuget package?
@bhugot in a few hours...
Thank you @mbhoek and @gasparnagy
As discussed in #19, this PR adds the Microsoft.Extensions.DependencyInjection integration plugin taken from https://github.com/solidtoken/SpecFlow.DependencyInjection/commit/daa540946a7024cae2fbd7027deecc82eca30cb2.