Skip to content

Commit

Permalink
Remove unnecessary .As in constructor argument tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKotsenas committed Jun 10, 2024
1 parent 37433b5 commit 122f996
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ public static IEnumerable<object[]> TestData()
yield return [@namespace, """new Mock<AbstractGenericClassWithCtor<object>>{|Moq1002:("42")|};"""];
yield return [@namespace, """new Mock<AbstractGenericClassWithCtor<object>>{|Moq1002:("42", 42)|};"""];
yield return [@namespace, """new Mock<AbstractGenericClassDefaultCtor<object>>{|Moq1002:(42)|};"""];
// TODO: Review use of `.As<>()` in this test case. It is not clear what purpose it serves.
yield return [@namespace, """new Mock<AbstractGenericClassDefaultCtor<object>>().As<AbstractGenericClassDefaultCtor<object>>();"""];
yield return [@namespace, """new Mock<AbstractGenericClassDefaultCtor<object>>();"""];
yield return [@namespace, """new Mock<AbstractGenericClassDefaultCtor<object>>();"""];
yield return [@namespace, """new Mock<AbstractGenericClassDefaultCtor<object>>(MockBehavior.Default);"""];
// TODO: "I think this _should_ fail, but currently passes. Tracked by #55."
// TODO: Review use of `.As<>()` in this test case. It is not clear what purpose it serves.
// yield return [@namespace, """new Mock<AbstractClassWithCtor>().As<AbstractClassWithCtor>();"""];
// yield return [@namespace, """new Mock<AbstractClassWithCtor>();"""];
yield return [@namespace, """new Mock<AbstractClassWithCtor>{|Moq1002:("42")|};"""];
yield return [@namespace, """new Mock<AbstractClassWithCtor>{|Moq1002:("42", 42)|};"""];
yield return [@namespace, """new Mock<AbstractClassDefaultCtor>{|Moq1002:(42)|};"""];
// TODO: Review use of `.As<>()` in this test case. It is not clear what purpose it serves.
yield return [@namespace, """new Mock<AbstractClassDefaultCtor>().As<AbstractClassDefaultCtor>();"""];
yield return [@namespace, """new Mock<AbstractClassDefaultCtor>();"""];
yield return [@namespace, """new Mock<AbstractClassWithCtor>(42);"""];
yield return [@namespace, """new Mock<AbstractClassWithCtor>(MockBehavior.Default, 42);"""];
yield return [@namespace, """new Mock<AbstractClassWithCtor>(42, "42");"""];
Expand Down

0 comments on commit 122f996

Please sign in to comment.