protected TestFixture LoadTestScripts(ScriptSuiteDefinition definition)
        {
            var engine = new Engine(definition.LanguageSetup, definition.EnableDebugging);
            engine.Initialise(definition.ScriptContext);

            var tests = new List<Test>();
            IList<string> scripts = definition.FindScripts();

            var testFixture = new TestFixture(definition.GetType());
            foreach (var script in scripts)
            {
                var test = new ScriptTest(script, engine);
                test.Fixture = testFixture;
                testFixture.Add(test);
            }

            return testFixture;
        }
Exemple #2
0
 public ScriptTest(string scriptPath, Engine engine)
     : base(Path.GetFileName(scriptPath))
 {
     _scriptPath = scriptPath;
     _engine = engine;
 }