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 // ****************************************************************
7 using System
.Collections
;
8 using System
.Collections
.Specialized
;
13 /// TestCaseDecorator is used to add functionality to
14 /// another TestCase, which it aggregates.
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; }