コード例 #1
0
ファイル: ModelTesting.cs プロジェクト: TA-Gen/TA-Gen
 public void Run(string[] steps)
 {
     var stepper = new Stepper();
     stepper.Reset();
     foreach (string step in steps)
     {
         stepper.DoAction(step);
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: TA-Gen/TA-Gen
        static void Main(string[] args)
        {
            using (ConsoleCopy copy = new ConsoleCopy("latestLog.txt"))
            {
                //var seleniumDataProvider = new SeleniumProviderFactory().CreateProvider();

                //var parser = new Parsing.Parser(
                //    seleniumDataProvider,
                //    new Parsing.XPathFinder(),
                //    new Parsing.NameFinder());

                //var project = new Models.Project();
                //project.Screens.Add(parser.ParseScreen());

                //project.Save("Playground\\MyProj");

                //var loaded = Models.Project.Load("Playground\\MyProj");
                //new SeleniumSharpGenerator().Generate(loaded, "Playground\\Generated\\");

                var stepper = new Stepper();
                stepper.Reset();

                string[] actions = new string[]{
                    "Do_CreateProject",
                    "Do_SelectSeleniumCodeGenerator",
                    "Do_GenerateCode",
                    "Do_SelectWebProvider",
                    "Do_SelectProvidedParser",
                    "Do_SelectDefaultParser",
                    "Do_SaveProject",
                    "Do_SelectProvidedParser",
                    "Do_SelectProvidedParser",
                    "Do_SaveProject",
                    "Do_GenerateCode",
                    "Do_SelectMobileProvider",
                    "Do_GenerateCode",
                    "Do_SelectProvidedParser",
                    "Do_AddScreenToProject",
                    "Do_AddScreenToProject",
                    "Do_GenerateCode",
                    "Do_SaveProject"
                };

                foreach (var action in actions)
                {
                    stepper.DoAction(new NModel.Terms.CompoundTerm(new NModel.Terms.Symbol(action)));
                }
            }
        }