Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/nunit/src/NUnitCore/AssemblyTestCollector.cs')
-rwxr-xr-xmcs/nunit/src/NUnitCore/AssemblyTestCollector.cs72
1 files changed, 0 insertions, 72 deletions
diff --git a/mcs/nunit/src/NUnitCore/AssemblyTestCollector.cs b/mcs/nunit/src/NUnitCore/AssemblyTestCollector.cs
deleted file mode 100755
index 9c707c43e33..00000000000
--- a/mcs/nunit/src/NUnitCore/AssemblyTestCollector.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using NUnit.Framework;
-
-namespace NUnit.Runner
-{
- /// <summary>
- /// Collects the names of all classes in an assembly that are tests.
- /// </summary>
- public sealed class AssemblyTestCollector : MarshalByRefObject, ITestCollector
- {
- #region Instance Variables
- private string fAssemblyName;
- private StandardLoader fLoader;
- #endregion
-
- #region Constructors
- /// <summary>
- /// Create a new AssemblyTestCollector for the specified
- /// assembly, and uses the supplied loader to load the tests
- /// from the assembly.
- /// </summary>
- /// <param name="assemblyName">The file name of the assembly
- /// from which to load classes</param>
- /// <param name="loader">An instance if the standard loader to
- /// use for loading tests from the assembly.</param>
- public AssemblyTestCollector(string assemblyName,
- StandardLoader loader)
- {
- if(loader!=null)
- fLoader = loader;
- else
- throw new ArgumentNullException("loader");
-
- if(assemblyName != null)
- {
- fAssemblyName = assemblyName;
- }
- else
- throw new ArgumentNullException("assemblyName");
-
- }
- /// <summary>
- /// Create a new AssemblyTestCollector for the specified
- /// assembly.
- /// </summary>
- /// <param name="assemblyName">The file name of the assembly
- /// from which to load classes.</param>
- public AssemblyTestCollector(string assemblyName)
- : this(assemblyName,new StandardLoader()){}
- /// <summary>
- /// returns a System.String[] of FullNames for all test classes
- /// contained within the assembly.
- /// Implements ITestCollector.CollectTestsClassNames()
- /// </summary>
- #endregion
-
- #region ITestCollector Methods
- public string[] CollectTestsClassNames()
- {
- Type[] tests = fLoader.GetTestTypes(fAssemblyName);
- string[] ret = new string[tests.Length];
- int i=0;
- foreach (Type testType in tests)
- {
- ret[i] = testType.FullName;
- i++;
- }
- return ret;
- }
- #endregion
- }
-}