ServiceClientGenerator.GeneratorDriver.ExecuteCustomizationTestGenerator C# (CSharp) Method

ExecuteCustomizationTestGenerator() public method

Runs the generator and saves the content in the test directory.
public ExecuteCustomizationTestGenerator ( BaseGenerator generator, string fileName, string subNamespace = null ) : void
generator ServiceClientGenerator.Generators.BaseGenerator The generator to use for outputting the text of the cs file
fileName string The name of the cs file
subNamespace string Adds an additional directory for the namespace
return void
        void ExecuteCustomizationTestGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
        {
            generator.Config = this.Configuration;
            var text = generator.TransformText();
            var outputSubFolder = subNamespace == null ? CustomizationTestsSubFolder : Path.Combine(CustomizationTestsSubFolder, subNamespace);
            WriteFile(TestFilesRoot, outputSubFolder, fileName, text);
        }