* Removed old files from previous Nunit versions.
svn path=/trunk/mcs/; revision=28101
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-#if (NET_2_0)
- [assembly: AssemblyVersion ("2.1.4.2")]
-#elif (NET_1_1)
- [assembly: AssemblyVersion ("2.1.4.0")]
+[assembly: AssemblyVersion("2.1.91.0")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+#if !StronglyNamedAssembly
+[assembly: AssemblyDelaySign(false)]
#else
- [assembly: AssemblyVersion ("2.1.4.0")]
+[assembly: AssemblyKeyFile("..\\..\\..\\Nunit.key")]
+[assembly: AssemblyKeyName("")]
#endif
-
-[assembly: AssemblyDelaySign (false)]
-[assembly: AssemblyKeyFile ("../nunit.key")]
[Option(Description = "Project configuration to load")]
public string config;
+ [Option(Short="out", Description = "File to receive test output")]
+ public string output;
+
+ [Option(Description = "File to receive test error output")]
+ public string err;
+
+ [Option(Description = "Label each test in stdOut")]
+ public bool labels = false;
+
+ [Option(Description = "List of categories to include")]
+ public string include;
+
+ [Option(Description = "List of categories to exclude")]
+ public string exclude;
+
private bool isInvalid = false;
public ConsoleOptions(String[] args) : base(args)
{
if(isInvalid) return false;
+ if(HasInclude && HasExclude) return false;
+
if(NoArgs) return true;
if(IsFixture) return true;
get
{
return ParameterCount >= 1 &&
- ((fixture != null) && (fixture.Length > 0));
+ ((fixture != null) && (fixture.Length > 0));
}
}
}
}
+ public bool isOut
+ {
+ get
+ {
+ return (output != null) && (output.Length != 0);
+ }
+ }
+
+ public bool isErr
+ {
+ get
+ {
+ return (err != null) && (err.Length != 0);
+ }
+ }
+
public bool IsTransform
{
get
}
}
+ public bool HasInclude
+ {
+ get
+ {
+ return include != null && include.Length != 0;
+ }
+ }
+
+ public bool HasExclude
+ {
+ get
+ {
+ return exclude != null && exclude.Length != 0;
+ }
+ }
+
+ public string[] IncludedCategories
+ {
+ get
+ {
+ if (HasInclude)
+ return include.Split( new char[] {';', ','});
+
+ return null;
+ }
+ }
+
+ public string[] ExcludedCategories
+ {
+ get
+ {
+ if (HasExclude)
+ return exclude.Split( new char[] {';', ','});
+
+ return null;
+ }
+ }
+
public override void Help()
{
Console.WriteLine();
Console.WriteLine();
}
}
-}
+}
\ No newline at end of file
+++ /dev/null
-#region Copyright (c) 2002, James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Philip A. Craig
-/************************************************************************************
-'
-' Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-' Copyright © 2000-2002 Philip A. Craig
-'
-' This software is provided 'as-is', without any express or implied warranty. In no
-' event will the authors be held liable for any damages arising from the use of this
-' software.
-'
-' Permission is granted to anyone to use this software for any purpose, including
-' commercial applications, and to alter it and redistribute it freely, subject to the
-' following restrictions:
-'
-' 1. The origin of this software must not be misrepresented; you must not claim that
-' you wrote the original software. If you use this software in a product, an
-' acknowledgment (see the following) in the product documentation is required.
-'
-' Portions Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-' or Copyright © 2000-2002 Philip A. Craig
-'
-' 2. Altered source versions must be plainly marked as such, and must not be
-' misrepresented as being the original software.
-'
-' 3. This notice may not be removed or altered from any source distribution.
-'
-'***********************************************************************************/
-#endregion
-
-using System;
-
-namespace NUnit.Util
-{
- public interface FileChangedEventHandler
- {
- void OnChanged(String fullPath);
- }
-}
[Option(Description = "Suppress loading of last project")]
public bool noload;
+ [Option(Description = "Automatically run the loaded project")]
+ public bool run;
+
+ [Option(Description = "Fixture to test")]
+ public string fixture;
+
public GuiOptions(String[] args) : base(args)
{}
SUBDIRS =
include ../../build/rules.make
-LIBRARY = NUnit.Util.dll
-LOCAL_MCS_FLAGS= -r:NUnit.Framework.dll -r:System.Xml.dll
+LIBRARY = nunit.util.dll
+LOCAL_MCS_FLAGS= \
+ /resource:Transform.resources,NUnit.Util.Transform.resources \
+ -r:nunit.framework.dll -r:nunit.core.dll -r:System.dll \
+ -r:System.Xml.dll /d:MONO /d:StronglyNamedAssembly
NO_TEST = yo
-EXTRA_DISTFILES = nunit.util.dll.csproj
+EXTRA_DISTFILES = \
+ nunit.util.dll.csproj \
+ Transform.resources \
+ Transform.resx \
include ../../build/library.make
./AssemblyInfo.cs
./AssemblyList.cs
./AssemblyListItem.cs
+./AssemblyWatcher.cs
./CommandLineOptions.cs
./ConsoleOptions.cs
+./ConsoleWriter.cs
+./ITestEvents.cs
+./ITestLoader.cs
./NUnitProject.cs
./ProjectConfig.cs
./ProjectConfigCollection.cs
./ProjectFormatException.cs
./ProjectPath.cs
+./ResultSummarizer.cs
+./SettingsGroup.cs
+./SettingsStorage.cs
+./StackTraceFilter.cs
+./SummaryVisitor.cs
+./TestDomain.cs
+./TestEventArgs.cs
+./TestEventDispatcher.cs
+./TestExceptionHandler.cs
+./TestLoader.cs
+./UIHelper.cs
+./UITestNode.cs
+./VSProjectConfigCollection.cs
+./VSProjectConfig.cs
+./VSProject.cs
+./XmlResultVisitor.cs
using System.Xml.Schema;
using System.IO;
using System.Threading;
-using NUnit.Framework;
using NUnit.Core;
namespace NUnit.Util
// True if it's ours or one we can load
public static bool CanLoadAsProject( string path )
{
- return false;
+ return IsProjectFile( path ) ||
+ VSProject.IsProjectFile( path ) ||
+ VSProject.IsSolutionFile( path );
}
public static string GenerateProjectName()
project.Load();
return project;
}
+ else if ( VSProject.IsProjectFile( path ) )
+ return NUnitProject.FromVSProject( path );
+ else if ( VSProject.IsSolutionFile( path ) )
+ return NUnitProject.FromVSSolution( path );
else
return NUnitProject.FromAssembly( path );
return project;
}
+ public static NUnitProject FromVSProject( string vsProjectPath )
+ {
+ NUnitProject project = new NUnitProject( Path.GetFullPath( vsProjectPath ) );
+
+ VSProject vsProject = new VSProject( vsProjectPath );
+ project.Add( vsProject );
+
+ project.isDirty = false;
+
+ return project;
+ }
+
public static NUnitProject FromVSSolution( string solutionPath )
{
NUnitProject project = new NUnitProject( Path.GetFullPath( solutionPath ) );
string[] parts = line.Split( delims );
string vsProjectPath = Path.Combine( solutionDirectory, parts[2].Trim(trimchars) );
+ if ( VSProject.IsProjectFile( vsProjectPath ) )
+ project.Add( new VSProject( vsProjectPath ) );
}
line = reader.ReadLine();
}
}
+ public void Add( VSProject vsProject )
+ {
+ foreach( VSProjectConfig vsConfig in vsProject.Configs )
+ {
+ string name = vsConfig.Name;
+
+ if ( !this.Configs.Contains( name ) )
+ this.Configs.Add( name );
+
+ ProjectConfig config = this.Configs[name];
+
+ foreach ( string assembly in vsConfig.Assemblies )
+ config.Assemblies.Add( assembly );
+ }
+ }
+
public void Load()
{
XmlTextReader reader = new XmlTextReader( projectPath );
Save();
}
- /// <summary>
- /// Load tests for this project into a test domain
- /// </summary>
- public Test LoadTest( TestDomain testDomain )
- {
- return LoadTest( testDomain, null );
- }
-
- /// <summary>
- /// Load tests for this project or for a particular fixture
- /// in the project into a test domain.
- /// </summary>
- public Test LoadTest( TestDomain testDomain, string testFixture )
- {
- if ( IsAssemblyWrapper )
- {
- return testDomain.LoadAssembly( ActiveConfig.Assemblies[0].FullPath, testFixture );
- }
- else
- {
- return testDomain.LoadAssemblies( ProjectPath, ActiveConfig.BasePath, ActiveConfig.ConfigurationFilePath, ActiveConfig.PrivateBinPath, ActiveConfig.TestAssemblies, testFixture );
- }
- }
-
#endregion
}
}
}
/// <summary>
- /// Return an ArrayList with the absolute paths of all assemblies
+ /// Return a string array with the absolute paths of all assemblies
/// </summary>
- public IList AbsolutePaths
+ public string[] AbsolutePaths
{
get
{
ArrayList paths = new ArrayList();
foreach( AssemblyListItem assembly in assemblies )
paths.Add( assembly.FullPath );
- return paths;
+ return (string[])paths.ToArray( typeof(string) );
}
}
/// <summary>
- /// Return an ArrayList with the relative paths of all
+ /// Return a string array with the relative paths of all
/// assemblies from the configuration BasePath.
/// </summary>
- public IList RelativePaths
+ public string[] RelativePaths
{
get
{
ArrayList paths = new ArrayList();
foreach( AssemblyListItem assembly in Assemblies )
paths.Add( ProjectPath.RelativePath( BasePath, assembly.FullPath ) );
- return paths;
+ return (string[])paths.ToArray( typeof(string) );
}
}
/// <summary>
- /// Return an ArrayList with the absolute paths of all
+ /// Return a string array with the absolute paths of all
/// assemblies that have tests
/// </summary>
- public IList TestAssemblies
+ public string[] TestAssemblies
{
get
{
foreach( AssemblyListItem assembly in Assemblies )
if ( assembly.HasTests )
paths.Add( assembly.FullPath );
- return paths;
+ return (string[])paths.ToArray( typeof(string) );
}
}
+++ /dev/null
-#region Copyright (c) 2002, James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Philip A. Craig
-/************************************************************************************
-'
-' Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-' Copyright © 2000-2002 Philip A. Craig
-'
-' This software is provided 'as-is', without any express or implied warranty. In no
-' event will the authors be held liable for any damages arising from the use of this
-' software.
-'
-' Permission is granted to anyone to use this software for any purpose, including
-' commercial applications, and to alter it and redistribute it freely, subject to the
-' following restrictions:
-'
-' 1. The origin of this software must not be misrepresented; you must not claim that
-' you wrote the original software. If you use this software in a product, an
-' acknowledgment (see the following) in the product documentation is required.
-'
-' Portions Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-' or Copyright © 2000-2002 Philip A. Craig
-'
-' 2. Altered source versions must be plainly marked as such, and must not be
-' misrepresented as being the original software.
-'
-' 3. This notice may not be removed or altered from any source distribution.
-'
-'***********************************************************************************/
-#endregion
-
-using System;
-using System.Collections;
-
-namespace NUnit.Util
-{
- /// <summary>
- /// RecentAssemblySettings holds settings for recent assemblies
- /// </summary>
- public class RecentAssemblySettings : SettingsGroup
- {
- private static readonly string NAME = "Recent-Assemblies";
-
- private static string[] valueNames = { "RecentAssembly1",
- "RecentAssembly2",
- "RecentAssembly3",
- "RecentAssembly4",
- "RecentAssembly5" };
-
- private IList assemblyEntries;
-
- public RecentAssemblySettings( ) : base ( NAME, UserSettings.GetStorageImpl( NAME ) )
- {
- LoadAssemblies();
- }
-
- public RecentAssemblySettings( SettingsStorage storage ) : base( NAME, storage )
- {
- LoadAssemblies();
- }
-
- public RecentAssemblySettings( SettingsGroup parent ) : base( NAME, parent )
- {
- LoadAssemblies();
- }
-
- private void LoadAssemblies()
- {
- assemblyEntries = new ArrayList();
- foreach( string valueName in valueNames )
- {
- string assemblyName = LoadStringSetting(valueName);
- if(assemblyName != null)
- assemblyEntries.Add(assemblyName);
- }
- }
-
- public override void Clear()
- {
- base.Clear();
- assemblyEntries = new ArrayList();
- }
-
- public IList GetAssemblies()
- {
- return assemblyEntries;
- }
-
- public string RecentAssembly
- {
- get
- {
- if(assemblyEntries.Count > 0)
- return (string)assemblyEntries[0];
-
- return null;
- }
- set
- {
- int index = assemblyEntries.IndexOf(value);
-
- if(index == 0) return;
-
- if(index != -1)
- {
- assemblyEntries.RemoveAt(index);
- }
-
- assemblyEntries.Insert(0, value);
- if(assemblyEntries.Count > valueNames.Length)
- assemblyEntries.RemoveAt(valueNames.Length);
-
- SaveSettings();
- }
- }
-
- public void Remove(string assemblyName)
- {
- assemblyEntries.Remove(assemblyName);
- SaveSettings();
- }
-
- private void SaveSettings()
- {
- for ( int index = 0;
- index < valueNames.Length;
- index++)
- {
- if ( index < assemblyEntries.Count )
- SaveSetting( valueNames[index], assemblyEntries[index] );
- else
- RemoveSetting( valueNames[index] );
- }
- }
- }
-}
+++ /dev/null
-/********************************************************************************************************************
-'
-' Copyright (c) 2002, James Newkirk, Michael C. Two, Alexei Vorontsov, Philip Craig
-'
-' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
-' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
-' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-'
-' The above copyright notice and this permission notice shall be included in all copies or substantial portions
-' of the Software.
-'
-' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-' THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-' DEALINGS IN THE SOFTWARE.
-'
-'*******************************************************************************************************************/
-namespace NUnit.Util
-{
- using System;
- using System.Collections;
- using Microsoft.Win32;
-
- /// <summary>
- /// Summary description for RecentAssembly.
- /// </summary>
- public class RecentAssemblyUtil
- {
- private RegistryKey key;
- private static string[] valueNames = { "RecentAssembly1",
- "RecentAssembly2",
- "RecentAssembly3",
- "RecentAssembly4",
- "RecentAssembly5" };
- private string subKey;
-
- private IList assemblyEntries;
-
- public RecentAssemblyUtil(string subKey)
- {
- this.subKey = subKey;
- key = NUnitRegistry.CurrentUser.CreateSubKey(subKey);
- assemblyEntries = new ArrayList();
- for(int index = 0; index < valueNames.Length; index++)
- {
- string valueName = (string)key.GetValue(valueNames[index]);
- if(valueName != null)
- assemblyEntries.Add(valueName);
- }
- }
-
- public void Clear()
- {
- NUnitRegistry.CurrentUser.DeleteSubKeyTree(subKey);
- assemblyEntries = new ArrayList();
- }
-
- public string RecentAssembly
- {
- get
- {
- if(assemblyEntries.Count > 0)
- return (string)assemblyEntries[0];
-
- return null;
- }
- set
- {
- int index = assemblyEntries.IndexOf(value);
-
- if(index == 0) return;
-
- if(index != -1)
- {
- assemblyEntries.RemoveAt(index);
- }
-
- assemblyEntries.Insert(0, value);
- if(assemblyEntries.Count > valueNames.Length)
- assemblyEntries.RemoveAt(valueNames.Length);
-
- SaveToRegistry();
- }
- }
-
- public IList GetAssemblies()
- {
- return assemblyEntries;
- }
-
- public void Remove(string assemblyName)
- {
- assemblyEntries.Remove(assemblyName);
- SaveToRegistry();
- }
-
- private void SaveToRegistry()
- {
- for(int index = 0;
- index < valueNames.Length;
- index++)
- {
- if ( index < assemblyEntries.Count )
- key.SetValue(valueNames[index], assemblyEntries[index]);
- else
- key.DeleteValue(valueNames[index], false);
- }
- }
- }
-}
-#region Copyright (c) 2002-2003, James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole, Philip A. Craig
-/************************************************************************************
-'
-' Copyright 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole
-' Copyright 2000-2002 Philip A. Craig
-'
-' This software is provided 'as-is', without any express or implied warranty. In no
-' event will the authors be held liable for any damages arising from the use of this
-' software.
-'
-' Permission is granted to anyone to use this software for any purpose, including
-' commercial applications, and to alter it and redistribute it freely, subject to the
-' following restrictions:
-'
-' 1. The origin of this software must not be misrepresented; you must not claim that
-' you wrote the original software. If you use this software in a product, an
-' acknowledgment (see the following) in the product documentation is required.
-'
-' Portions Copyright 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole
-' or Copyright 2000-2002 Philip A. Craig
-'
-' 2. Altered source versions must be plainly marked as such, and must not be
-' misrepresented as being the original software.
-'
-' 3. This notice may not be removed or altered from any source distribution.
-'
-'***********************************************************************************/
-#endregion
-
using System;
-using System.Diagnostics;
-using NUnit.Core;
namespace NUnit.Util
{
/// <summary>
- /// The delegate for all events related to running tests
+ /// The delegate for all events related to loading test projects
/// </summary>
- public delegate void TestEventHandler ( object sender, TestEventArgs args );
+ public delegate void TestProjectEventHandler ( object sender, TestProjectEventArgs args );
- /// <summary>
- /// Enumeration used to distiguish test events
- /// </summary>
- public enum TestAction
+ public enum TestProjectAction
{
- // Project Loading Events
ProjectLoading,
ProjectLoaded,
ProjectLoadFailed,
ProjectUnloading,
ProjectUnloaded,
ProjectUnloadFailed,
- // Test Loading Events
- TestLoading,
- TestLoaded,
- TestLoadFailed,
- TestReloading,
- TestReloaded,
- TestReloadFailed,
- TestUnloading,
- TestUnloaded,
- TestUnloadFailed,
- // Test Running Events
- RunStarting,
- RunFinished,
- SuiteStarting,
- SuiteFinished,
- TestStarting,
- TestFinished
}
-
+
/// <summary>
- /// Argument used for all test events
+ /// Summary description for TestProjectEventArgs.
/// </summary>
- public class TestEventArgs : EventArgs
+ public class TestProjectEventArgs : EventArgs
{
#region Instance Variables
// The action represented by the event
- private TestAction action;
+ private TestProjectAction action;
- // The file name for the test
- private string testFileName;
-
- // The top node of a loaded test suite
- private UITestNode test;
-
- // The result of a test
- private TestResult result;
+ // The project name
+ private string projectName;
// The exception causing a failure
private Exception exception;
#region Constructors
- public TestEventArgs( TestAction action,
- string testFileName, UITestNode test )
- {
- this.action = action;
- this.testFileName = testFileName;
- this.test = test;
- }
-
- public TestEventArgs( TestAction action, string testFileName )
- {
- this.action = action;
- this.testFileName = testFileName;
- }
-
- public TestEventArgs( TestAction action,
- string testFileName, Exception exception )
- {
- this.action = action;
- this.testFileName = testFileName;
- this.exception = exception;
- }
-
- public TestEventArgs( TestAction action, UITestNode test )
- {
- this.action = action;
- this.test = test;
- }
-
- public TestEventArgs( TestAction action, TestResult result )
+ public TestProjectEventArgs( TestProjectAction action, string projectName )
{
this.action = action;
- this.result = result;
+ this.projectName = projectName;
}
- public TestEventArgs( TestAction action, Exception exception )
+ public TestProjectEventArgs( TestProjectAction action,
+ string projectName, Exception exception )
{
this.action = action;
+ this.projectName = projectName;
this.exception = exception;
}
#region Properties
- public TestAction Action
+ public TestProjectAction Action
{
get { return action; }
}
- public string TestFileName
- {
- get { return testFileName; }
- }
-
- public bool IsProjectFile
- {
- get { return NUnitProject.IsProjectFile( testFileName ); }
- }
-
- public UITestNode Test
- {
- get { return test; }
- }
-
- public TestResult Result
+ public string ProjectName
{
- get { return result; }
+ get { return projectName; }
}
public Exception Exception
/// </summary>
private string description;
- #endregion
-
- #region Construction and Conversion
+ private ArrayList categories = new ArrayList();
- public UITestNode( string suiteName ) : this( suiteName, 0 ) { }
+ private bool isExplicit;
- public UITestNode( string suiteName, int assemblyKey )
- {
- this.fullName = this.testName = suiteName;
- this.assemblyKey = assemblyKey;
- this.shouldRun = true;
- this.isSuite = true;
- this.testCaseCount = 0;
- this.tests = new ArrayList();
- }
-
- public UITestNode( string pathName, string testName )
- : this( pathName, testName, 0 ) { }
+ #endregion
- public UITestNode( string pathName, string testName, int assemblyKey )
- {
- this.fullName = pathName + "." + testName;
- this.testName = testName;
- this.assemblyKey = assemblyKey;
- this.shouldRun = true;
- this.isSuite = false;
- this.testCaseCount = 1;
- }
+ #region Construction and Conversion
/// <summary>
/// Construct from a TestInfo interface, which might be
shouldRun = test.ShouldRun;
ignoreReason = test.IgnoreReason;
description = test.Description;
+ isExplicit = test.IsExplicit;
+
+ if (test.Categories != null)
+ {
+ categories.AddRange(test.Categories);
+ }
+
+ if ( test is UITestNode )
+ testCaseCount = 0;
if ( test.IsSuite )
{
{
if ( !Populated )
{
- foreach( Test test in testSuite.Tests )
+ foreach( ITest test in testSuite.Tests )
{
UITestNode node = new UITestNode( test, true );
tests.Add( node );
- testCaseCount += node.CountTestCases;
+ testCaseCount += node.CountTestCases();
}
testSuite = null;
}
}
+ public bool IsExplicit
+ {
+ get { return isExplicit; }
+ set { isExplicit = value; }
+ }
+
+ public IList Categories
+ {
+ get { return categories; }
+ }
+
+ public bool HasCategory( string name )
+ {
+ return categories != null && categories.Contains( name );
+ }
+
+ public bool HasCategory( IList names )
+ {
+ if ( categories == null )
+ return false;
+
+ foreach( string name in names )
+ if ( categories.Contains( name ) )
+ return true;
+
+ return false;
+ }
+
/// <summary>
/// Count of test cases in this test. If the suite
/// has never been populated, it will be done now.
/// </summary>
- public int CountTestCases
+ public int CountTestCases()
{
- get
- {
- if ( !Populated )
- PopulateTests();
+ if ( !Populated )
+ PopulateTests();
- return testCaseCount;
- }
+ return testCaseCount;
}
/// <summary>
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
- <Reference
- Name = "nunit.framework.dll"
- Project = "{83DD7E12-A705-4DBA-9D71-09C8973D9382}"
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
AssemblyName = "System.Drawing"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll"
/>
+ <Reference
+ Name = "nunit.core.dll"
+ Project = "{EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ <Reference
+ Name = "nunit.framework.dll"
+ Project = "{83DD7E12-A705-4DBA-9D71-09C8973D9382}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
</References>
</Build>
<Files>
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "ConsoleWriter.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "FormSettings.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "ResultSummarizer.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "SettingsGroup.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "StackTraceFilter.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "SummaryVisitor.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "TestDomain.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "TestEventArgs.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "TestExceptionHandler.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "TestLoader.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "Transform.resx"
+ BuildAction = "EmbeddedResource"
+ />
<File
RelPath = "UIHelper.cs"
SubType = "Code"
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "XmlResultVisitor.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
</Include>
</Files>
</CSHARP>