~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to src/NUnitFramework/core/TestResult.cs

  • Committer: jnewkirk
  • Date: 2002-07-10 20:00:13 UTC
  • Revision ID: vcs-imports@canonical.com-20020710200013-j8us5mbi0usp7p02
initialĀ load

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// Copyright (C) 2002. James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. All Rights Reserved.
 
3
//
 
4
namespace Nunit.Core
 
5
{
 
6
        using System;
 
7
 
 
8
        /// <summary>
 
9
        /// Summary description for TestResult.
 
10
        /// </summary>
 
11
        /// 
 
12
        [Serializable]
 
13
        public abstract class TestResult
 
14
        {
 
15
                private bool isFailure; 
 
16
                private double time;
 
17
                private string name;
 
18
                private Test test;
 
19
                
 
20
                protected TestResult(Test test, string name)
 
21
                {
 
22
                        this.name = name;
 
23
                        this.test = test;
 
24
                }
 
25
 
 
26
                public virtual string Name
 
27
                {
 
28
                        get{ return name;}
 
29
                }
 
30
 
 
31
                public Test Test
 
32
                {
 
33
                        get{ return test;}
 
34
                }
 
35
 
 
36
                public virtual bool IsSuccess
 
37
                {
 
38
                        get { return !(isFailure); }
 
39
                }
 
40
                
 
41
                public virtual bool IsFailure
 
42
                {
 
43
                        get { return isFailure; }
 
44
                        set { isFailure = value; }
 
45
                }
 
46
 
 
47
                public double Time 
 
48
                {
 
49
                        get{ return time; }
 
50
                        set{ time = value; }
 
51
                }
 
52
 
 
53
                public abstract string Message
 
54
                {
 
55
                        get;
 
56
                }
 
57
 
 
58
                public abstract string StackTrace
 
59
                {
 
60
                        get;
 
61
                }
 
62
 
 
63
                public abstract void NotRun(string message);
 
64
 
 
65
 
 
66
                public abstract void Accept(ResultVisitor visitor);
 
67
        }
 
68
}