~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to addins/RowTest/NUnitExtension.RowTest/RowAttribute.cs

  • Committer: charliepoole
  • Date: 2008-05-05 22:17:22 UTC
  • Revision ID: vcs-imports@canonical.com-20080505221722-7bdjujqed8pk6al3
Add back RowTestExtension as a separately compiled assembly, bundled
with NUnit, and modify build script to handle addins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// *********************************************************************
 
2
// Copyright 2007, Andreas Schlapsi
 
3
// This is free software licensed under the MIT license. 
 
4
// *********************************************************************
 
5
using System;
 
6
 
 
7
namespace NUnitExtension.RowTest
 
8
{
 
9
        [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
 
10
        public sealed class RowAttribute : Attribute
 
11
        {
 
12
                private string _testName;
 
13
                private object[] _arguments;
 
14
                private string _description;
 
15
                private Type _expectedExceptionType;
 
16
                private string _exceptionMessage;
 
17
                
 
18
                public RowAttribute(object argument1)
 
19
                {
 
20
                        _arguments = new object[] { argument1 };
 
21
                }
 
22
                
 
23
                public RowAttribute(object argument1, object argument2)
 
24
                {
 
25
                        _arguments = new object[] { argument1, argument2 };
 
26
                }
 
27
                
 
28
                public RowAttribute(object argument1, object argument2, object argument3)
 
29
                {
 
30
                        _arguments = new object[] { argument1, argument2, argument3 };
 
31
                }
 
32
                
 
33
                public RowAttribute(params object[] arguments)
 
34
                {
 
35
                        _arguments = arguments;
 
36
                }
 
37
                
 
38
                public string TestName
 
39
                {
 
40
                        get { return _testName; }
 
41
                        set { _testName = value; }
 
42
                }
 
43
                
 
44
                public object[] Arguments
 
45
                {
 
46
                        get { return _arguments; }
 
47
                }
 
48
                
 
49
                public string Description
 
50
                {
 
51
                        get { return _description; }
 
52
                        set { _description = value; }
 
53
                }
 
54
                
 
55
                public Type ExpectedException
 
56
                {
 
57
                        get { return _expectedExceptionType; }
 
58
                        set { _expectedExceptionType = value; }
 
59
                }
 
60
                
 
61
                public string ExceptionMessage
 
62
                {
 
63
                        get { return _exceptionMessage; }
 
64
                        set { _exceptionMessage = value; }
 
65
                }
 
66
        }
 
67
}