Esempio n. 1
0
        public void GenerateTest_NoTemplateDir_DirNotFoundException()
        {
            if (Directory.Exists(Config.Template.TargetTemplate))
            {
                Directory.Delete(Config.Template.TargetTemplate);
            }

            ScriptGenerater sg = new ScriptGenerater();

            sg.Generate(Config.Template.TargetTemplate, IPs, Config.Output);
        }
Esempio n. 2
0
        public void GenerateTest_TestData_ScriptsGenerated()
        {
            DirectoryInfo dirInfo = new DirectoryInfo(Config.Output);

            foreach (FileInfo item in dirInfo.GetFiles())
            {
                item.Delete();
            }

            ScriptGenerater sg = new ScriptGenerater();

            sg.Generate(Config.TestData.TemplateFolder, IPs, Config.Output);

            Assert.IsTrue(File.Exists(System.IO.Path.Combine(Config.Output, "RoutesUp.bat")));
        }
 public ActionResult GenerateScript()
 {
     rtg.Optimize(Config.Remote.Path, Config.Remote.IPRegx);
     stg.Generate(Config.Template.TargetTemplate, rtg.IPs, Config.Output);
     return(View());
 }