-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTextTestResult.cs
More file actions
43 lines (37 loc) · 1.11 KB
/
TextTestResult.cs
File metadata and controls
43 lines (37 loc) · 1.11 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
using System;
using System.IO;
using System.Reflection;
namespace NinjaTrader.UnitTest
{
public class TextTestResult : TestResult
{
private readonly TextWriter _writer;
public TextTestResult(TextWriter writer)
{
_writer = writer;
}
public override void AddError(string testCase, Exception exception)
{
base.AddError(testCase, exception);
_writer.WriteLine($"ERROR: {testCase}");
_writer.WriteLine(exception);
}
public override void AddFailure(string testCase, Exception exception)
{
base.AddFailure(testCase, exception);
_writer.WriteLine($"FAIL: {testCase}");
_writer.WriteLine(exception);
}
//public override void StartTest(string testCase)
//{
// base.StartTest(testCase);
// _writer.Write(testCase);
// _writer.Write(" ... ");
//}
//public override void StopTest(string testCase)
//{
// base.StopTest(testCase);
// _writer.WriteLine("ok");
//}
}
}