Based on inferences from this Mocking tools comparison article by Richard Banks, and how AutoMoq works, I believe:
- NSubstitute doesn't have a separation between the
Mock
and theMock.Object
like Moq does - A AutoFixture.Auto* extensions hook in a
SpecimenBuilderNode
to supply the [mocked] implementation of interfaces, i.e.fixture.Create<IFileUtils>()
should work - Freeze is equivalent to a
var result = fixture.Create<IFileUtils>(); fixture.Inject(result)
Therefore you should just be able to say:
var fileUtilMock = fixture.Freeze<IFileUtils>();