2010-05-21 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / nunit24 / NUnitCore / interfaces / TestCaseResult.cs
1 // ****************************************************************\r
2 // This is free software licensed under the NUnit license. You\r
3 // may obtain a copy of the license as well as information regarding\r
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.\r
5 // ****************************************************************\r
6 \r
7 namespace NUnit.Core\r
8 {\r
9         using System;\r
10         using System.Text;\r
11 \r
12         /// <summary>\r
13         /// TestCaseResult represents the result of a test case execution\r
14         /// </summary>\r
15         [Serializable]\r
16         public class TestCaseResult : TestResult\r
17         {\r
18         /// <summary>\r
19         /// Construct a result for a test case\r
20         /// </summary>\r
21         /// <param name="testCase">The test case for which this is a result</param>\r
22                 public TestCaseResult(TestInfo testCase)\r
23                         : base(testCase, testCase.TestName.FullName) { }\r
24 \r
25                 /// <summary>\r
26                 /// Construct a result from a string - used for tests\r
27                 /// </summary>\r
28                 /// <param name="testCaseString"></param>\r
29                 public TestCaseResult(string testCaseString) \r
30                         : base(null, testCaseString) { }\r
31 \r
32         /// <summary>\r
33         /// Accept a ResultVisitor\r
34         /// </summary>\r
35         /// <param name="visitor">The visitor to accept</param>\r
36                 public override void Accept(ResultVisitor visitor) \r
37                 {\r
38                         visitor.Visit(this);\r
39                 }\r
40         }\r
41 }\r