System: Nunit test, resharper test runner, .Net 4.6, BDDfy version 4.1.2
Example code:
this.Given(x => x.GivenTheSiteCoverageService())
.And(x => x.GivenTheFirstAerialJobSite().WithCoverage(80m).OverSite(FirstSite))
....
Effectively, putting the additional methods "WithCoverage" and "OverSite" causes BDDFY to fail with exception:
An exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user code
Additional information: variable 'x' of type '' referenced from scope '', but it is not defined
Removing the fluent extensions I created for my types allows it to work.
But the alternative of complex unreadable constructors for all my permutations is wrong (shouldn't have to change the object under test). Is there a way to achieve what I'm trying to achieve here?
System: Nunit test, resharper test runner, .Net 4.6, BDDfy version 4.1.2
Example code:
Effectively, putting the additional methods "WithCoverage" and "OverSite" causes BDDFY to fail with exception:
An exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user code
Additional information: variable 'x' of type '' referenced from scope '', but it is not defined
Removing the fluent extensions I created for my types allows it to work.
But the alternative of complex unreadable constructors for all my permutations is wrong (shouldn't have to change the object under test). Is there a way to achieve what I'm trying to achieve here?