1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.SharpDevelop.Dom;
7
namespace ICSharpCode.UnitTesting
9
public enum TestResultType {
11
/// The test has not been run.
26
/// The test was ignored.
32
/// Holds the information about a single test result.
34
public class TestResult
36
string name = String.Empty;
37
string message = String.Empty;
38
string stackTrace = String.Empty;
39
TestResultType resultType = TestResultType.None;
40
FilePosition stackTraceFilePosition = FilePosition.Empty;
42
public TestResult(string name)
51
public bool IsSuccess {
52
get { return resultType == TestResultType.Success; }
55
public bool IsFailure {
56
get { return resultType == TestResultType.Failure; }
59
public bool IsIgnored {
60
get { return resultType == TestResultType.Ignored; }
63
public TestResultType ResultType {
64
get { return resultType; }
65
set { resultType = value; }
68
public string Message {
69
get { return message; }
70
set { message = value; }
73
public string StackTrace {
74
get { return stackTrace; }
76
if (stackTrace != value) {
78
OnStackTraceChanged();
83
protected virtual void OnStackTraceChanged()
87
public FilePosition StackTraceFilePosition {
88
get { return stackTraceFilePosition; }
89
set { stackTraceFilePosition = value; }