Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / nunit24 / NUnitExtensions / framework / RepeatAttribute.cs
1 // ****************************************************************\r
2 // Copyright 2007, Charlie Poole\r
3 // This is free software licensed under the NUnit license. You may\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4\r
5 // ****************************************************************\r
6 \r
7 using System;\r
8 \r
9 namespace NUnit.Framework.Extensions\r
10 {\r
11         /// <summary>\r
12         /// RepeatAttribute may be applied to test case in order\r
13         /// to run it multiple times.\r
14         /// </summary>\r
15         [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]\r
16         public class RepeatAttribute : Attribute\r
17         {\r
18                 private int count;\r
19 \r
20                 /// <summary>\r
21                 /// Construct a RepeatAttribute\r
22                 /// </summary>\r
23                 /// <param name="count">The number of times to run the test</param>\r
24                 public RepeatAttribute(int count)\r
25                 {\r
26                         this.count = count;\r
27                 }\r
28 \r
29                 /// <summary>\r
30                 /// Gets the number of times to run the test.\r
31                 /// </summary>\r
32                 public int Count\r
33                 {\r
34                         get { return count; }\r
35                 }\r
36         }\r
37 }\r