mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
|
using System;
|
||
|
using System.Linq;
|
||
|
using NUnit.Framework.Interfaces;
|
||
|
using NUnit.Framework.Internal.Filters;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
using UnityEngine.TestTools.TestRunner.GUI;
|
||
|
|
||
|
namespace UnityEngine.TestTools.TestRunner
|
||
|
{
|
||
|
[Serializable]
|
||
|
internal class PlaymodeTestsControllerSettings
|
||
|
{
|
||
|
[SerializeField]
|
||
|
public RuntimeTestRunnerFilter[] filters;
|
||
|
public bool sceneBased;
|
||
|
public string originalScene;
|
||
|
public string bootstrapScene;
|
||
|
|
||
|
public static PlaymodeTestsControllerSettings CreateRunnerSettings(RuntimeTestRunnerFilter[] filters)
|
||
|
{
|
||
|
var settings = new PlaymodeTestsControllerSettings
|
||
|
{
|
||
|
filters = filters,
|
||
|
sceneBased = false,
|
||
|
originalScene = SceneManager.GetActiveScene().path,
|
||
|
bootstrapScene = null
|
||
|
};
|
||
|
return settings;
|
||
|
}
|
||
|
|
||
|
internal ITestFilter BuildNUnitFilter()
|
||
|
{
|
||
|
return new OrFilter(filters.Select(f => f.BuildNUnitFilter()).ToArray());
|
||
|
}
|
||
|
}
|
||
|
}
|