Пример #1
0
        private static async Task <string> Run(string script)
        {
            var testInstanceBuilder = new TestInstanceBuilder(new NullLocator());
            var runner = new ScriptRunner(typeof(ScriptRunnerTests).Assembly.DefinedTypes, testInstanceBuilder,
                                          new TestStringBuilder());
            await runner.Run(new ScriptParser(Tokenizer.Create()).Parse(script));

            return(testInstanceBuilder.CreatedInstances);
        }
Пример #2
0
        private static async Task <TestInstanceBuilder> TestInstanceBuilder(string testtask)
        {
            var parser = new ScriptParser(Tokenizer.Create());
            var script = parser.Parse(testtask);
            var testInstanceBuilder = new TestInstanceBuilder(new NullLocator());
            var runner = new ScriptRunner(typeof(RunnerTests).Assembly.DefinedTypes, testInstanceBuilder, new TestStringBuilder());
            await runner.Run(script);

            return(testInstanceBuilder);
        }