Nexus/Library/PackageCache/com.unity.ide.visualstudio@a99d56dec63f/Editor/Testing/TestAdaptor.cs

47 lines
907 B
C#
Raw Permalink Normal View History

2026-01-06 17:23:00 +01:00
using System;
using UnityEditor.TestTools.TestRunner.Api;
2026-01-14 22:48:47 +01:00
#if UNITY_6000_5_OR_NEWER
using UnityEngine;
#endif
2026-01-06 17:23:00 +01:00
namespace Microsoft.Unity.VisualStudio.Editor.Testing
{
[Serializable]
internal class TestAdaptorContainer
{
public TestAdaptor[] TestAdaptors;
}
[Serializable]
internal class TestAdaptor
{
public string Id;
public string Name;
public string FullName;
public string Type;
public string Method;
public string Assembly;
public int Parent;
public TestAdaptor(ITestAdaptor testAdaptor, int parent)
{
Id = testAdaptor.Id;
Name = testAdaptor.Name;
FullName = testAdaptor.FullName;
Type = testAdaptor.TypeInfo?.FullName;
Method = testAdaptor.Method?.Name;
2026-01-14 22:48:47 +01:00
#if UNITY_6000_5_OR_NEWER
Assembly = testAdaptor.TypeInfo?.Assembly?.GetLoadedAssemblyPath();
#else
2026-01-06 17:23:00 +01:00
Assembly = testAdaptor.TypeInfo?.Assembly?.Location;
2026-01-14 22:48:47 +01:00
#endif
2026-01-06 17:23:00 +01:00
Parent = parent;
}
}
}