Skip to content

Commit

Permalink
Cherry-picked: [UITestMethod] should invoke test method with null (#1045
Browse files Browse the repository at this point in the history
) (#1061)

Co-authored-by: Nandin Borjigin <nandiin@163.com>
  • Loading branch information
cvpoienaru and Nandin Borjigin authored Apr 7, 2022
1 parent d9282ab commit 3a7b92e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TestFramework/Extension.UWP/UITestMethodAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public override TestResult[] Execute(ITestMethod testMethod)
Windows.UI.Core.CoreDispatcherPriority.Normal,
() =>
{
result = testMethod.Invoke(new object[] { });
result = testMethod.Invoke(null);
}).AsTask().GetAwaiter().GetResult();

return new TestResult[] { result };
Expand Down
2 changes: 1 addition & 1 deletion src/TestFramework/Extension.WinUI/UITestMethodAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override TestResult[] Execute(ITestMethod testMethod)
{
try
{
result = testMethod.Invoke(Array.Empty<object>());
result = testMethod.Invoke(null);
}
catch (Exception e)
{
Expand Down

0 comments on commit 3a7b92e

Please # to comment.