using System.Collections.Generic; using System.Linq; using NUnit.Framework.Interfaces; namespace UnityEngine.TestTools { /// /// Represents a test run configuration. This record holds information about the test run environment and the tests to be executed. /// /// /// The Test Mode for this test run. /// /// /// The Test Platform for this test run. /// /// /// The list of tests to be executed. /// public record TestData(TestMode TestMode, RuntimePlatform TestPlatform, IEnumerable TestList) { /// public override string ToString() { var testList = TestList ?? Enumerable.Empty(); var testNames = testList.Select(t => t?.FullName ?? "null").ToList(); var testListString = testNames.Count == 0 ? "(empty)" : string.Join("\n\t\t- ", testNames); return $"TestData:\n\tTestMode: {TestMode}\n\tTestPlatform: {TestPlatform}\n\tTestList ({testNames.Count}):{(testNames.Count == 0 ? " (empty)" : $"\n\t\t- {testListString}")}"; } } }