0

Can anybody realize what I am missing here? I just want to create a controller to test. TController is a type argument of my TestFixture class. This code returns a NotImplementedException. Why?

var fixture = new Fixture().Customize(new AutoMoqCustomization());
SutController = fixture.Create<TController>();
Adanay Martín
  • 397
  • 1
  • 3
  • 15

1 Answers1

1

I do not know why but I have to do the following:

var fixture = new Fixture().Customize(new AutoMoqCustomization());
fixture.Customize<ControllerContext>(c => c.OmitAutoProperties());
SutController = fixture.Create<TController>();
Adanay Martín
  • 397
  • 1
  • 3
  • 15