Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test detection accuracy of non-transitive calls
The current implementation of `VerifyNoOtherCalls` has one short- coming, which is that if a method is invoked in both a "transitive" manner but also non-transitively, then the latter cannot be recognized as such. For example: var mock = new Mock<IFoo> { DefaultValue = DefaultValue.Mock }; mock.Object.A().B(); mock.Object.A(); mock.Verify(m => m.A().B()); mock.VerifyNoOtherCalls(); With the above, `VerifyNoOtherCalls` won't currently be able to recog- nise the second, "non-transitive" call to `.A()` as one that needs to be explicitly verified. No verification exception will be thrown. Add tests that document both this problem, and a possible way of fix- ing it.
- Loading branch information