Skip to content

Commit

Permalink
Add test for positional and named params.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffska committed Nov 30, 2022
1 parent eadcf48 commit 43688b2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tests/Invoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,23 @@ public void TestCacheableMethodPocoOverloadingPassAndGetValueArgOptional()
Assert.AreEqual("object named", (object)tOut);
}

[Test]
public void TestCacheableMethodPocoOverloadingPassAndGetValueArgPostiionalOptional()
{
var tPoco = new OverloadingMethPoco();

var tValue1 = 1;
var tValue2 = 2;

var tCachedIvnocation = new CacheableInvocation(InvocationKind.InvokeMember, "Func", argCount: 2,
argNames: new[] { "two" });

var tOut = tCachedIvnocation.Invoke(tPoco, tValue1, tValue2);

Assert.AreEqual("object named", tOut);

Assert.AreEqual("object named", (object)tOut);
}

[Test]
public void TestMethodPocoOverloadingPass2AndGetValueArgOptional()
Expand Down

0 comments on commit 43688b2

Please sign in to comment.