public string Load(string testAssemblyPath, IDictionary <string, object> settings) { if (!File.Exists(testAssemblyPath)) { throw new ArgumentException("testAssemblyPath", "Framework driver Load called with a file name that doesn't exist."); } _testAssemblyPath = testAssemblyPath; _name = Escape(Path.GetFileName(_testAssemblyPath)); _fullname = Escape(_testAssemblyPath); _package = new Core.TestPackage(_testAssemblyPath); foreach (var key in settings.Keys) { _package.Settings[key] = settings[key]; } if (!_runner.Load(_package)) { return(string.Format(LOAD_RESULT_FORMAT, TestID, _name, _fullname, "No tests were found")); } Core.ITest test = _runner.Test; // TODO: Handle error where test is null return(test.ToXml(false).OuterXml); }
public string Load() { if (!_runner.Load(new Core.TestPackage(_testAssemblyPath))) { return(string.Format(LOAD_RESULT_FORMAT, _name, _fullname, "No tests were found")); } Core.ITest test = _runner.Test; // TODO: Handle error where test is null return(test.ToXml(false).OuterXml); }