Example #1
0
        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);
        }
Example #2
0
        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);
        }