示例#1
0
文件: Program.cs 项目: mtmk/ts
        static void Main(string[] args)
        {
            var spec = new Spec();

            spec.AddStepImplAssembly(Assembly.GetExecutingAssembly());
            spec.AddStepDefFile(new FileInfo("Demo.spc.md"));

            // spec.Dump(Console.Out);

            var results = spec.Run();

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }
示例#2
0
        public async Task RunSpec()
        {
            var val = await _editor.GetValue();

            var spec = new Spec();

            spec.AddStepImplAssembly(Assembly.GetExecutingAssembly());
            spec.AddStepDefText(val);
            var results = spec.Run();

            Results = "";
            foreach (var result in results)
            {
                Results += $"{result}\n";
                Console.WriteLine(result);
            }

            StateHasChanged();
        }