PageRenderTime 34ms CodeModel.GetById 26ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/NUnit/core/TestFixture.cs

#
C# | 44 lines | 26 code | 5 blank | 13 comment | 0 complexity | 0d478df3f91eb791bb9ab3c0daa7eb08 MD5 | raw file
 1// ****************************************************************
 2// This is free software licensed under the NUnit license. You
 3// may obtain a copy of the license as well as information regarding
 4// copyright ownership at http://nunit.org.
 5// ****************************************************************
 6
 7using System;
 8
 9namespace NUnit.Core
10{
11	/// <summary>
12	/// TestFixture is a surrogate for a user test fixture class,
13	/// containing one or more tests.
14	/// </summary>
15	public class TestFixture : TestSuite
16	{
17		#region Constructors
18        public TestFixture(Type fixtureType)
19            : base(fixtureType) { }
20        public TestFixture(Type fixtureType, object[] arguments)
21            : base(fixtureType, arguments) { }
22        #endregion
23
24		#region TestSuite Overrides
25
26        /// <summary>
27        /// Gets a string representing the kind of test
28        /// that this object represents, for use in display.
29        /// </summary>
30        public override string TestType
31        {
32            get { return "TestFixture"; }
33        }
34
35        public override TestResult Run(EventListener listener, ITestFilter filter)
36        {
37            using ( new DirectorySwapper( AssemblyHelper.GetDirectoryName( FixtureType.Assembly ) ) )
38            {
39                return base.Run(listener, filter);
40            }
41        }
42		#endregion
43	}
44}