public void ShouldTestEndToEnd()
 {
     string path = "C:\\Users\\ssaxena\\Desktop\\sankalpTCTemp\\config";
     var tcObjectBuilder = new TcObjectBuilder();
     var diagramsGenerator = new DiagramsGenerator(tcObjectBuilder, path);
     var hasSaved = diagramsGenerator.GenerateDiagramsAndSaveAsFilesInDirectory(
         "C:\\Users\\ssaxena\\Desktop\\AutoSequenceDiagramGenerator");
     Assert.IsTrue(hasSaved);
 }
        public void ShouldGenerateOutputForWebSequenceDiagramAndSaveToFile()
        {
            var objectBuilder = new Mock<ITcObjectBuilder>(MockBehavior.Strict);
            objectBuilder.Setup(ob => ob.BuildObjectGraph(path)).Returns(tcProjects);
            // method under test
            var diagramsGenerator = new DiagramsGenerator(objectBuilder.Object, path);
            var hasSaved = diagramsGenerator.GenerateDiagramsAndSaveAsFilesInDirectory(
                    "C:\\Users\\ssaxena\\Desktop\\AutoSequenceDiagramGenerator");

            objectBuilder.VerifyAll();
            Assert.IsTrue(hasSaved);
        }
        static void Main(string[] args)
        {
            if (args != null && args.Length == 2)
            {
                var rootFolder = args[0];
                var saveDiagramsAtPath = args[1];
                var diagramsGenerator = new DiagramsGenerator(new TcObjectBuilder(), rootFolder);
                var hasSaved = diagramsGenerator.GenerateDiagramsAndSaveAsFilesInDirectory(
                    saveDiagramsAtPath);
                var message = hasSaved
                            ? string.Format("Diagrams generated Successfuly at location{0}", saveDiagramsAtPath)
                            : "Encountered an Error generating the diagrams";

                Console.WriteLine(message);
            }
            else
            {
                Console.WriteLine("Insifficient arguments. Usage: ");
                Console.WriteLine(
                    "WebSequenceDiagramGeneratorCmd \"PathToTeamCityConfigsRootFolder\" \"PathToDirectoryWhereDiagramsShouldBeStored\" ");
            }
            Console.Read();
        }