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
C# 7 introduced language syntax for tuples (System.ValueTuple<…>), Moq should probably support them. For example, given these types:
System.ValueTuple<…>
public interface IFoo { (IBar, IEnumerable<string>) GetThings(); } public interface IBar { }
The following test should pass:
[Fact] public void DefaultValue_Mock_supports_tuple_return_types() { var mock = new Mock<IFoo>() { DefaultValue.Mock }; var (bar, strings) = mock.Object.GetThings(); Assert.NotNull(bar); Assert.IsAssignableFrom<IBar>(bar); Assert.NotNull(strings); Assert.Empty(strings); }
(Same goes for DefaultValue.Empty.)
DefaultValue.Empty
The text was updated successfully, but these errors were encountered:
DefaultValue.Mock
stakx
Successfully merging a pull request may close this issue.
C# 7 introduced language syntax for tuples (
System.ValueTuple<…>
), Moq should probably support them. For example, given these types:The following test should pass:
(Same goes for
DefaultValue.Empty
.)The text was updated successfully, but these errors were encountered: