2010-06-03 Jb Evain <jbevain@novell.com>
[mcs.git] / nunit24 / NUnitCore / core / AbstractTestCaseDecoration.cs
blob8aa2b45c9f5382aa77170959e56ee5e7277dfb87
1 // ****************************************************************
2 // Copyright 2007, Charlie Poole
3 // This is free software licensed under the NUnit license. You may
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4
5 // ****************************************************************
6 using System;
7 using System.Collections;
8 using System.Collections.Specialized;
10 namespace NUnit.Core
12 /// <summary>
13 /// TestCaseDecorator is used to add functionality to
14 /// another TestCase, which it aggregates.
15 /// </summary>
16 public abstract class AbstractTestCaseDecoration : TestCase
18 protected TestCase testCase;
20 public AbstractTestCaseDecoration( TestCase testCase )
21 : base( (TestName)testCase.TestName.Clone() )
23 this.testCase = testCase;
24 this.RunState = testCase.RunState;
25 this.IgnoreReason = testCase.IgnoreReason;
26 this.Description = testCase.Description;
27 this.Categories = new System.Collections.ArrayList(testCase.Categories);
28 if (testCase.Properties != null)
30 this.Properties = new ListDictionary();
31 foreach (DictionaryEntry entry in testCase.Properties)
32 this.Properties.Add(entry.Key, entry.Value);
36 public override int TestCount
38 get { return testCase.TestCount; }