0

I've got a class that I am testing:

public class ClassUnderTest
{

     public ClassUnderTest()
     {
        //do stuff
     }

     public ClassUnderTest(IComplexType complexType)
     {
        //do other stuff
     }

}

When I create my fixture, how do I invoke the constructor that has the IComplexType parameter? Is this a possibility with autofixture? If not, is there a different framework?

var fixture = new Fixture();
var mock = fixture.Create<ClassUnderTest(new ComplexType()); //how should this be done?
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062

0 Answers0