Skip to content

Commit

Permalink
Add test case for #172
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmurillo committed Aug 26, 2024
1 parent e2e6789 commit 02a8426
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public static IEnumerable<object[]> TestData()
"""new Mock<IFoo>().Setup(x => x.Do(It.IsAny<List<string>>())).Returns(0).Callback((List<string> l) => { });""",
"""new Mock<IFoo>().Setup(x => x.Do(It.IsAny<List<string>>())).Returns(0).Callback((List<string> l) => { });""",
],
[ // Repro for https://github.com/rjmurillo/moq.analyzers/issues/172
"""new Mock<IFoo>().Setup(m => m.DoSomething(It.IsAny<object?>())).Returns((object? bar) => true);""",
"""new Mock<IFoo>().Setup(m => m.DoSomething(It.IsAny<object?>())).Returns((object? bar) => true);""",
],
}.WithNamespaces().WithMoqReferenceAssemblyGroups();
}

Expand All @@ -91,6 +95,8 @@ internal interface IFoo
int Do(int i, string s, DateTime dt);
int Do(List<string> l);
bool DoSomething(object? bar);
}
internal class UnitTest
Expand Down

0 comments on commit 02a8426

Please sign in to comment.