public bool doTest() { Console.WriteLine(); ReqDisplay.title("Req #8 - An automated unit test suite"); ReqDisplay.message(message); string[] args = new string[] { "../../../DemoExecutive/SpecialTestCases/" }; DemoExecutive.ShowCommandLine(args); List <string> files = DemoExecutive.ProcessCommandline(args); Repository repo = new Repository(); repo.semi = Factory.create(); DemoExecutive.BuildTypeTable(args, files, repo); Display.showTypeTable(repo.typeTable); Console.WriteLine(); Display.showAliasTable(repo.aliasTable); Console.WriteLine(); DemoExecutive.depAnalysis(args, files, repo); Console.Write("\n\nDependency Analysis:"); Display.showDependency(repo.depGraph); Console.Write("\n"); var strongComponents = TarjanSccSolver.DetectCycle(repo.depGraph); Display.showStrongComponents(strongComponents); return(true); }
public bool doTest() { Console.WriteLine(); ReqDisplay.title("Req #7 - Display the results in a well formated area of the output"); ReqDisplay.message("- It can be demonstrated by the result from Requirement 8."); return(true); }
public bool doTest() { Console.WriteLine(); ReqDisplay.title("Req #6 - Find all strong components in the file collection"); ReqDisplay.message("- In this program, Tarjan Algorithm is used to solve strong components."); string[] args = new string[] { "../../../DemoExecutive/Test/" }; DemoExecutive.ShowCommandLine(args); List <string> files = DemoExecutive.ProcessCommandline(args); Repository repo = new Repository(); repo.semi = Factory.create(); BuildTypeAnalyzer builder = new BuildTypeAnalyzer(repo); Parser parser = builder.build(); DemoExecutive.BuildTypeTable(args, files, repo); DemoExecutive.depAnalysis(args, files, repo); Console.Write("\n\nDependency Analysis:"); Display.showDependency(repo.depGraph); Console.Write("\n"); var strongComponents = TarjanSccSolver.DetectCycle(repo.depGraph); Display.showStrongComponents(strongComponents); return(true); }
public bool doTest() { ReqDisplay.title("Req #3 - C# packages requirements"); ReqDisplay.message("- Shall have C# packages: " + "\n Toker, SemiExp, TypeTable, TypeAnalysis," + " DepAnalysis, " + "\n StrongComponent, Display, Tester." + "\n - This program including the following packages:"); FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); //nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); List <string> listDirectory = new List <string> { "LexicalScanner", "TypeTable", "TypeAnalysis", "DepAnalysis", "StrongComponentAlys", "Display", "Repository", "DemoExecutive", "Graph", "FileMgr", "TestHarness" }; foreach (string directory in listDirectory) { path = "../../../" + directory; nav.go(path, false); } Console.WriteLine(); return(true); }
public bool doTest() { Console.WriteLine(); ReqDisplay.title("Req #4 - Support specifying all C# files in a sub-directory"); ReqDisplay.message("- This program supports specifying the collection as all C# files " + "\n in a sub-directory tree, rooted at a specified path." + "\n - usage: [a specified directory path]"); string[] args = new string[] { "../../../DemoExecutive/Test/" }; DemoExecutive.ShowCommandLine(args); List <string> files = DemoExecutive.ProcessCommandline(args); foreach (string file in files) { Console.Write("\n Processing file {0}", Path.GetFileName(file)); } Console.WriteLine(); return(true); }
public bool doTest() { Console.WriteLine(); ReqDisplay.title("Req #5 - Identify the user-defined types in the specified set of files"); ReqDisplay.message("- This program could dentify all of the Types defined within that code, " + "\n e.g., interfaces, classes, structs, enums, and delegates."); string[] args = new string[] { "../../../DemoExecutive/Test/" }; DemoExecutive.ShowCommandLine(args); List <string> files = DemoExecutive.ProcessCommandline(args); Repository repo = new Repository(); repo.semi = Factory.create(); DemoExecutive.BuildTypeTable(args, files, repo); Display.showTypeTable(repo.typeTable); Console.WriteLine(); Display.showAliasTable(repo.aliasTable); Console.WriteLine(); return(true); }