public string Setup()
        {
            const string OutputDirectoryName = FileSystemPrefix + @"JSONFeatureOutput";
            const string RootPath = FileSystemPrefix + @"JSON\Features";
            const string TestResultFilePath = FileSystemPrefix + @"JSON\results-example-failing-and-pasing-mstest.trx";

            string filePath = FileSystem.Path.Combine(OutputDirectoryName, JsonDocumentationBuilder.JsonFileName);

            this.AddFakeFolderAndFiles("JSON", new[] { "results-example-failing-and-pasing-mstest.trx" });
            this.AddFakeFolderAndFiles(
                @"JSON\Features",
                new[]
                {
                    "OneScenarioTransferingMoneyBetweenAccountsFailing.feature",
                    "TransferBetweenAccounts_WithSuccess.feature",
                    "TwoScenariosTransferingFundsOneFailingOneSuccess.feature",
                    "TwoScenariosTransferingMoneyBetweenAccoutsWithSuccess.feature",
                });

            var resultFile = RetrieveContentOfFileFromResources(ResourcePrefix + "JSON.results-example-failing-and-pasing-mstest.trx");
            FileSystem.AddFile(TestResultFilePath, resultFile);

            GeneralTree<INode> features = Container.Resolve<DirectoryTreeCrawler>().Crawl(RootPath);

            var outputDirectory = FileSystem.DirectoryInfo.FromDirectoryName(OutputDirectoryName);
            if (!outputDirectory.Exists)
            {
                outputDirectory.Create();
            }

            var configuration = new Configuration
            {
                OutputFolder = FileSystem.DirectoryInfo.FromDirectoryName(OutputDirectoryName),
                DocumentationFormat = DocumentationFormat.Json,
                TestResultsFormat = TestResultsFormat.MsTest,
                SystemUnderTestName = "SUT Name",
                SystemUnderTestVersion = "SUT Version"
            };
            configuration.AddTestResultFile(FileSystem.FileInfo.FromFileName(TestResultFilePath));

            ITestResults testResults = new MsTestResults(configuration, new MsTestSingleResultLoader(), new MsTestScenarioOutlineExampleMatcher());
            var jsonDocumentationBuilder = new JsonDocumentationBuilder(configuration, testResults, FileSystem);
            jsonDocumentationBuilder.Build(features);
            string content = FileSystem.File.ReadAllText(filePath);

            return content;
        }
        public void Setup()
        {
            this.AddFakeFolderStructures();

            GeneralTree<INode> features = Container.Resolve<DirectoryTreeCrawler>().Crawl(FileSystemPrefix);

            var outputDirectory = FileSystem.DirectoryInfo.FromDirectoryName(OutputDirectory);
            if (!outputDirectory.Exists)
            {
                outputDirectory.Create();
            }

            var configuration = new Configuration
            {
                OutputFolder = FileSystem.DirectoryInfo.FromDirectoryName(OutputDirectory),
                DocumentationFormat = DocumentationFormat.Json
            };

            var jsonDocumentationBuilder = new JsonDocumentationBuilder(configuration, null, FileSystem);
            jsonDocumentationBuilder.Build(features);
        }
        private void TweakJsonFile()
        {
            var jsonBuilder = new JsonDocumentationBuilder(this.configuration, this.testResults, this.fileSystem);
            var jsonFilePath = jsonBuilder.OutputFilePath;

            var tweaker = new JsonTweaker(this.fileSystem);
            tweaker.AddJsonPWrapperTo(jsonFilePath);
            tweaker.RenameFileTo(jsonFilePath, jsonFilePath.Replace(".json", ".js"));
        }
 private void UtilizeJsonBuilderToDumpJsonFeatureFileNextToDthmlResources(GeneralTree<INode> features)
 {
     var jsonBuilder = new JsonDocumentationBuilder(this.configuration, this.testResults, this.fileSystem);
     jsonBuilder.Build(features);
 }