提交 e7d21a11 编写于 作者: S Sam Harwell

Allow WpfFact tests to run from Test Explorer

This commit adds the necessary deserialization constructor which allows
WpfFact tests to be run from Test Explorer in Visual Studio. This is very
helpful for cases like debugging a unit test.
上级 25fb200d
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
......@@ -19,6 +20,13 @@ public class WpfTestCase : XunitTestCase
{
private readonly SemaphoreSlim _wpfTestSerializationGate;
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")]
public WpfTestCase()
{
_wpfTestSerializationGate = new SemaphoreSlim(1);
}
public WpfTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, ITestMethod testMethod, SemaphoreSlim wpfTestSerializationGate, object[] testMethodArguments = null)
: base(diagnosticMessageSink, defaultMethodDisplay, testMethod, testMethodArguments)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册