I have the following class:
class Foo
{
public Foo(string str, int i, bool b, DateTime d, string str2)
{
.....
}
}
I'm creating a Foo
with AutoFixture:
var foo = fixture.Create<Foo>();
but I want AutoFixture to provide a known value for the str2
parameter and use the default behavior for every other parameter.
I tried implementing a SpecimenBuilder
but I can't find a way to get the metadata associated with the request to know that I'm being called from the Foo constructor.
Is there any way to achieve this?