RemoteTestResultData.cs
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework.Interfaces;
namespace UnityEngine.TestRunner.TestLaunchers
{
[Serializable]
internal class RemoteTestResultData
{
public string testId;
public string name;
public string fullName;
public string resultState;
public TestStatus testStatus;
public double duration;
public DateTime startTime;
public DateTime endTime;
public string message;
public string stackTrace;
public int assertCount;
public int failCount;
public int passCount;
public int skipCount;
public int inconclusiveCount;
public bool hasChildren;
public string output;
public string xml;
public string[] childrenIds;
internal RemoteTestResultData(ITestResult result)
{
testId = result.Test.Id;
name = result.Name;
fullName = result.FullName;
resultState = result.ResultState.ToString();
testStatus = result.ResultState.Status;
duration = result.Duration;
startTime = result.StartTime;
endTime = result.EndTime;
message = result.Message;
stackTrace = result.StackTrace;
assertCount = result.AssertCount;
failCount = result.FailCount;
passCount = result.PassCount;
skipCount = result.SkipCount;
inconclusiveCount = result.InconclusiveCount;
hasChildren = result.HasChildren;
output = result.Output;
xml = result.ToXml(true).OuterXml;
childrenIds = result.Children.Select(child => child.Test.Id).ToArray();
}
}
}