Build() public méthode

public Build ( Tree features ) : void
features Tree
Résultat void
        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);

            Tree 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();

            Tree 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 UtilizeJsonBuilderToDumpJsonFeatureFileNextToDthmlResources(Tree features)
 {
     var jsonBuilder = new JsonDocumentationBuilder(this.configuration, this.testResults, this.fileSystem);
     jsonBuilder.Build(features);
 }