~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to src/NUnitFramework/core/Test.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
        ///             Test Class.
 
10
        /// </summary>
 
11
        public abstract class Test : MarshalByRefObject
 
12
        {
 
13
                private string fullName;
 
14
                private string testName;
 
15
                private bool shouldRun;
 
16
                private string ignoreReason;
 
17
 
 
18
                protected Test(string pathName, string testName) 
 
19
                { 
 
20
                        fullName = pathName + "." + testName;
 
21
                        this.testName = testName;
 
22
                        shouldRun = true;
 
23
                }
 
24
 
 
25
                public string IgnoreReason
 
26
                {
 
27
                        get { return ignoreReason; }
 
28
                        set { ignoreReason = value; }
 
29
                }
 
30
 
 
31
                public bool ShouldRun
 
32
                {
 
33
                        get { return shouldRun; }
 
34
                        set { shouldRun = value; }
 
35
                }
 
36
 
 
37
                public Test(string name)
 
38
                {
 
39
                        fullName = testName = name;
 
40
                }
 
41
 
 
42
                public string FullName 
 
43
                {
 
44
                        get { return fullName; }
 
45
                }
 
46
 
 
47
                public string Name
 
48
                {
 
49
                        get { return testName; }
 
50
                }
 
51
 
 
52
                public abstract int CountTestCases { get; }
 
53
                public abstract TestResult Run(EventListener listener);
 
54
        }
 
55
}