Skip to content

Commit 3a7b92e

Browse files
cvpoienaruNandin Borjigin
andauthored
Cherry-picked: [UITestMethod] should invoke test method with null (#1045) (#1061)
Co-authored-by: Nandin Borjigin <nandiin@163.com>
1 parent d9282ab commit 3a7b92e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TestFramework/Extension.UWP/UITestMethodAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public override TestResult[] Execute(ITestMethod testMethod)
3535
Windows.UI.Core.CoreDispatcherPriority.Normal,
3636
() =>
3737
{
38-
result = testMethod.Invoke(new object[] { });
38+
result = testMethod.Invoke(null);
3939
}).AsTask().GetAwaiter().GetResult();
4040

4141
return new TestResult[] { result };

src/TestFramework/Extension.WinUI/UITestMethodAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override TestResult[] Execute(ITestMethod testMethod)
4848
{
4949
try
5050
{
51-
result = testMethod.Invoke(Array.Empty<object>());
51+
result = testMethod.Invoke(null);
5252
}
5353
catch (Exception e)
5454
{

0 commit comments

Comments
 (0)