PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/src/NUnit/core/AbstractTestCaseDecoration.cs

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