Open loverainstm opened 5 years ago
This should be possible. I'm not familiar with nsubstitute, but can you just pass in the instance that nsubstitute generates using FromInstance?
`[TestFixture] public class PlayerMovementTests : ZenjectUnitTestFixture {
private PlayerMovement _sut;
private MovementDirection _movementDirection;
[SetUp]
public void CommonInstall()
{
_movementDirection = Substitute.For<MovementDirection>();
Container
.Bind<MovementDirection>()
.FromInstance(_movementDirection);
Container
.Bind<PlayerMovement>()
.AsSingle();
_sut = Container.Resolve<PlayerMovement>();
}
}`
NSubstitute has been added to the optional extras. https://github.com/Mathijs-Bakker/Extenject/blob/master/Documentation/AutoMocking.md
we want to use nsubstitute for automation test. any suggestion? thanks a lot.