diff options
Diffstat (limited to 'mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs')
-rw-r--r-- | mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs | 80 |
1 files changed, 44 insertions, 36 deletions
diff --git a/mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs b/mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs index 7ea7071e7c6..ebdd9565760 100644 --- a/mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs +++ b/mcs/nunit/src/NUnitCore/StandardTestSuiteLoader.cs @@ -1,39 +1,47 @@ -namespace NUnit.Runner {
+namespace NUnit.Runner
+{
+ using System;
+ using System.Reflection;
+ using System.IO;
+ using System.Security;
- using System;
- using System.Reflection;
- using System.IO;
- using System.Security;
+ /// <summary>
+ /// The standard test suite loader. It can only load the same
+ /// class once.
+ /// </summary>
+ [Obsolete("Use StandardLoader or UnloadingLoader")]
+ public class StandardTestSuiteLoader: ITestSuiteLoader
+ {
+ /// <summary>
+ /// Loads
+ /// </summary>
+ /// <param name="testClassName"></param>
+ /// <returns></returns>
+ public Type Load(string testClassName)
+ {
+ Type testClass;
+ string[] classSpec=testClassName.Split(',');
+ if (classSpec.Length > 1)
+ {
+ FileInfo dll=new FileInfo(classSpec[1]);
+ if (!dll.Exists)
+ throw new FileNotFoundException("File " + dll.FullName + " not found", dll.FullName);
+ Assembly a = Assembly.LoadFrom(dll.FullName);
+ testClass=a.GetType(classSpec[0], true);
+ }
+ else
+ testClass = Type.GetType(testClassName, true);
+ return testClass;
+ }
- /// <summary>The standard test suite loader. It can only load the same
- /// class once.</summary>
- public class StandardTestSuiteLoader: ITestSuiteLoader {
- /// <summary>
- ///
- /// </summary>
- /// <param name="suiteClassName"></param>
- /// <returns></returns>
- public Type Load(string suiteClassName) {
- Type testClass;
- string[] classSpec=suiteClassName.Split(',');
- if (classSpec.Length > 1) {
- FileInfo dll=new FileInfo(classSpec[1]);
- if (!dll.Exists)
- throw new FileNotFoundException("File " + dll.FullName + " not found", dll.FullName);
- Assembly a = Assembly.LoadFrom(dll.FullName);
- testClass=a.GetType(classSpec[0], true);
- }
- else
- testClass = Type.GetType(suiteClassName, true);
- return testClass;
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="aClass"></param>
- /// <returns></returns>
- public Type Reload(Type aClass) {
- return aClass;
- }
- }
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="aClass"></param>
+ /// <returns></returns>
+ public Type Reload(Type aClass)
+ {
+ return aClass;
+ }
+ }
}
\ No newline at end of file |