2020-02-29 14:34:35 +10:00
|
|
|
// Copyright © 2020 The CefSharp Authors. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
using Xunit.Abstractions;
|
|
|
|
|
using Xunit.Sdk;
|
|
|
|
|
|
2020-02-29 15:04:50 +10:00
|
|
|
[assembly: Xunit.TestFramework("CefSharp.Test.CefSharpXunitTestFramework", "CefSharp.Test")]
|
2020-02-29 14:34:35 +10:00
|
|
|
|
|
|
|
|
namespace CefSharp.Test
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Custom <see cref="XunitTestFramework"/> that allows for code to run begin/end of
|
|
|
|
|
/// each test run. Classes should implement <see cref="IDisposable"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class CefSharpXunitTestFramework : XunitTestFramework
|
|
|
|
|
{
|
|
|
|
|
public CefSharpXunitTestFramework(IMessageSink messageSink)
|
|
|
|
|
: base(messageSink)
|
|
|
|
|
{
|
|
|
|
|
//Create a new BindingRedirectAssemblyResolver to resolve the assemblies
|
|
|
|
|
//that xUnit is unable to Load
|
|
|
|
|
DisposalTracker.Add(new BindingRedirectAssemblyResolver());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|