Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public ScriptTest(string scriptPath, Engine engine)
     : base(Path.GetFileName(scriptPath))
 {
     _scriptPath = scriptPath;
     _engine = engine;
 }