/src/NUnit/core/AbstractTestCaseDecoration.cs
C# | 42 lines | 29 code | 3 blank | 10 comment | 2 complexity | cd55e3499dba60722f4d7074c0ed26b1 MD5 | raw file
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. 5// **************************************************************** 6using System; 7using System.Collections; 8using System.Collections.Specialized; 9 10namespace NUnit.Core 11{ 12 /// <summary> 13 /// TestDecorator is used to add functionality to 14 /// another Test, which it aggregates. 15 /// </summary> 16 public abstract class TestDecorator : TestMethod 17 { 18 protected TestMethod test; 19 20 public TestDecorator( TestMethod test ) 21 //: base( (TestName)test.TestName.Clone() ) 22 : base( test.Method ) 23 { 24 this.test = test; 25 this.RunState = test.RunState; 26 this.IgnoreReason = test.IgnoreReason; 27 this.Description = test.Description; 28 this.Categories = new System.Collections.ArrayList( test.Categories ); 29 if ( test.Properties != null ) 30 { 31 this.Properties = new ListDictionary(); 32 foreach (DictionaryEntry entry in test.Properties) 33 this.Properties.Add(entry.Key, entry.Value); 34 } 35 } 36 37 public override int TestCount 38 { 39 get { return test.TestCount; } 40 } 41 } 42}