Hello everyone,
I think I have found a bug in Specflow's XUnit support, but before I file a bug - I first want to check with this group.
When I create a specflow test project using Specflow 2.3.1 with the xUnit unitTestProvider, containing a dummy feature like this:
----
Feature: Something
Scenario: DummyScenario
----
and a Binding class similar to this:
----
[Binding]
public class MySteps
{
private ITestOutputHelper _testOutputHelper;
public MySteps(ITestOutputHelper testOutputHelper)
{
_testOutputHelper = testOutputHelper;
}
[BeforeScenario]
public void Before()
{
}
}
----
Then when I execute the test, It will fail with a "BoDi.ObjectContainerException" stating it cannot resolve "Xunit.Abstractions.ITestOutputHelper". However, when I remove the [BeforeScenario] attribute, it will run fine - and a valid xUnit ITestOutputHelper instance will be injected in the constructor.
Is there anyone who has seen something similar? Or maybe this is not a bug, but a configuration issue?
Best regards, Alex