I have a solution which contains a set of tests which can be run using nuints. I am trying to integrate specflow into it:
[TestFixture]
[Binding]
public class TestBase
{
protected IWindsorContainer Container {get; set; }
protected IMongoCollectionManager CollectionManager { get; set; }
protected IDatabaseManager DatabaseManager { get; set; }
[TestFixtureSetUp]
[BeforeScenario,CLSCompliant(false)]
public void Setup()
{
Container = TestFixture.Container;
CollectionManager = Container.Resolve<IMongoCollectionManager>();
DatabaseManager = Container.Resolve<IDatabaseManager>();
}
[TestFixtureTearDown]
public void TearDown()
{
Container.Release(CollectionManager);
Container.Release(DatabaseManager);
}
}
Everytime I run the feature file which basically just has one scenario it executes the before tests four times, before it even goes to the given of that scenario but when I run it using simple nuint it works correctly and gets called only once. Can any one help me figure out why please? Thanks, Bijo