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