~a-schlapsi/nunit-3.0/linux-makefile

« back to all changes in this revision

Viewing changes to src/framework/Internal/Extensibility/TestDecoratorCollection.cs

  • Committer: Andreas Schlapsi
  • Date: 2010-01-23 23:14:05 UTC
  • mfrom: (18.1.137 work)
  • Revision ID: a.schlapsi@gmx.at-20100123231405-17deqoh18nfnbq1j
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
using System;
25
25
using System.Collections;
26
26
using System.Reflection;
 
27
using NUnit.Framework.Internal;
27
28
 
28
29
namespace NUnit.Core.Extensibility
29
30
{
35
36
        public class TestDecoratorCollection : ExtensionPoint, IExtensionPoint2, ITestDecorator
36
37
        {
37
38
                #region Constructor
 
39
 
 
40
        /// <summary>
 
41
        /// Initializes a new instance of the <see cref="TestDecoratorCollection"/> class.
 
42
        /// </summary>
 
43
        /// <param name="host">The host.</param>
38
44
                public TestDecoratorCollection(IExtensionHost host)
39
45
                        : base( "TestDecorators", host, 10 ) { }
 
46
 
40
47
                #endregion
41
48
 
42
49
                #region ITestDecorator Members
43
50
 
 
51
        /// <summary>
 
52
        /// Examine the a Test and either return it as is, modify it
 
53
        /// or return a different TestCase.
 
54
        /// </summary>
 
55
        /// <param name="test">The Test to be decorated</param>
 
56
        /// <param name="member">The MethodInfo used to construct the test</param>
 
57
        /// <returns>The resulting Test</returns>
44
58
                public Test Decorate(Test test, MemberInfo member)
45
59
                {
46
60
                        Test decoratedTest = test;
50
64
 
51
65
                        return decoratedTest;
52
66
                }
 
67
 
53
68
                #endregion
54
69
 
55
70
                #region ExtensionPoint Overrides
 
71
 
 
72
        /// <summary>
 
73
        /// Determines whether [is valid extension] [the specified extension].
 
74
        /// </summary>
 
75
        /// <param name="extension">The extension.</param>
 
76
        /// <returns>
 
77
        ///     <c>true</c> if [is valid extension] [the specified extension]; otherwise, <c>false</c>.
 
78
        /// </returns>
56
79
                protected override bool IsValidExtension(object extension)
57
80
                {
58
81
                        return extension is ITestDecorator; 
59
82
                }
 
83
 
60
84
                #endregion
61
85
        }
62
86
}