8000 Restore TestInvoker<T>.GetTaskFromResult (forwards to AsyncUtility.Tr… · xunit/xunit@d97c7f8 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit d97c7f8

Browse files
committed
Restore TestInvoker<T>.GetTaskFromResult (forwards to AsyncUtility.TryConvertToTask)
1 parent 416ed81 commit d97c7f8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.ComponentModel;
23
using System.Globalization;
34
using System.Reflection;
45
using System.Security;
@@ -147,6 +148,11 @@ protected virtual Task BeforeTestMethodInvokedAsync()
147148
protected virtual object CallTestMethod(object testClassInstance)
148149
=> TestMethod.Invoke(testClassInstance, TestMethodArguments);
149150

151+
/// <summary/>
152+
[EditorBrowsable(EditorBrowsableState.Never)]
153+
public static Task GetTaskFromResult(object obj) =>
154+
AsyncUtility.TryConvertToTask(obj);
155+
150156
/// <summary>
151157
/// Creates the test class (if necessary), and invokes the test method.
152158
/// </summary>

0 commit comments

Comments
 (0)
0