csf-dev / CSF.Screenplay

Implementation of the Screenplay pattern (aka Journey) in .NET
https://csf-dev.github.io/CSF.Screenplay/
MIT License
13 stars 1 forks source link

SpecFlow should be supported when using an alternative DI container #201

Open craigfowler opened 2 months ago

craigfowler commented 2 months ago

There are plugins for other DI containers available. Currently I don't know if I'm supporting these very well.

I need to research how they work and determine what I need to do in order to support them properly.

craigfowler commented 2 months ago

Dev approach ideas

At first glance, it seems like - in the Autofac integration at least - the BoDi container is essentially replaced by Autofac. Whilst the BoDi container does remain, it's interesting to see how the ITestObjectResolver service is replaced by an Autofac implementation. That means that the DI registrations from the Screenplay plugin won't be effective, because they're added to the wrong container.

If I want to support this (low priority) then I think I need to provide better integration for adding Screenplay to a DI container that's not BoDi, but still supporting the relevant Screenplay events, so that the plugin still functions.