We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I believe the expected behaviour would be for argument matching to work with recursive mocks. To illustrate my point, the example below fails.
public interface INameHolder { string Name { get; } } public interface IFoo { INameHolder Foo(int index); } [TestFixture] public class TestSet { [Test] public void BrokenTest() { var foo = Mock.Of<IFoo>(f => f.Foo(It.Is<int>(i => i == 1)).Name == "One" && f.Foo(It.Is<int>(i => i == 2)).Name == "Two"); Assert.AreEqual("One", foo.Foo(1).Name); Assert.AreEqual("Two", foo.Foo(2).Name); } } // Output was: // String lengths are both 3. // Strings differ at index 0. // expected: <"One"> // but was: <"Two"> // ------------^
The text was updated successfully, but these errors were encountered:
Action<...>
Expression<Action<...>>
Closing this, this problem will be tracked in #643 (together with a couple other related issues).
Sorry, something went wrong.
No branches or pull requests
I believe the expected behaviour would be for argument matching to work with recursive mocks. To illustrate my point, the example below fails.
The text was updated successfully, but these errors were encountered: