0

Somehow AutoFixture.AutoMoq is setting the property DefaultValueProvider of Mock<T> to DefaultValueProvider.Mock and I need to customize AutoFixture in a way that the value set is instead DefaultValueProvider.Empty.

I can't seem to find a way to do that.

sergi
  • 1,049
  • 2
  • 12
  • 22
  • Are you expecting the AutoMoqCustomization to configure the members? e.g., `fixture.Customize(new AutoMoqCustomization() { ConfigureMembers = true })`? Or are you only looking for AutoMoq to create raw Moq instances when an interface is created? – Jeff Dammeyer Sep 03 '20 at 18:15
  • @JeffDammeyer I am not setting ConfigureMembers to any value, so whatever comes by default is fine (I think it was `false`). What I've seen in the source code from AutoMoqCustomization class is that `DefaultValueProvider` is set to `Mock` regardless of the value of `ConfigureMembers` property. – sergi Sep 04 '20 at 06:28

0 Answers0