GlobalGameJame/Library/PackageCache/com.unity.test-framework@1.1.9/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs

45 lines
1.1 KiB
C#
Raw Normal View History

2020-01-31 15:10:04 +00:00
using UnityEditor.TestTools.TestRunner.Api;
namespace UnityEditor.TestTools.TestRunner.GUI
{
internal class WindowResultUpdater : ICallbacks, ITestTreeRebuildCallbacks
{
public void RunStarted(ITestAdaptor testsToRun)
{
}
public void RunFinished(ITestResultAdaptor testResults)
{
if (TestRunnerWindow.s_Instance != null)
{
TestRunnerWindow.s_Instance.RebuildUIFilter();
}
}
public void TestStarted(ITestAdaptor testName)
{
}
public void TestFinished(ITestResultAdaptor test)
{
if (TestRunnerWindow.s_Instance == null)
{
return;
}
var result = new TestRunnerResult(test);
TestRunnerWindow.s_Instance.m_SelectedTestTypes.UpdateResult(result);
}
public void TestTreeRebuild(ITestAdaptor test)
{
if (TestRunnerWindow.s_Instance == null)
{
return;
}
TestRunnerWindow.s_Instance.m_SelectedTestTypes.UpdateTestTree(test);
}
}
}