/// <summary> /// Applies generator-specific settings. /// </summary> public override void ApplySettings(FileGeneratorSettings settings) { var ourSettings = (MarkdownGeneratorSettings)settings; NoHttp = ourSettings.NoHttp; TemplateText = ourSettings.TemplatePath is null ? null : File.ReadAllText(ourSettings.TemplatePath); }
/// <summary> /// Applies generator-specific settings. /// </summary> public override void ApplySettings(FileGeneratorSettings settings) { var aspNetSettings = (AspNetGeneratorSettings)settings; NamespaceName = aspNetSettings.NamespaceName; ApiNamespaceName = aspNetSettings.ApiNamespaceName; TargetFramework = aspNetSettings.TargetFramework; }
public void FileGeneratorSettings_WhenAlways_ShouldGetHomePath() { //Arrange var fileGeneratorSettings = new FileGeneratorSettings(); var genericSettings = new GenericSettings(); //Act var result = fileGeneratorSettings.homePath; //Assert Assert.Equal(genericSettings.homePath, result); }
public void FileGeneratorSettings_WhenAlways_ShouldReceiveParameters() { //Arrange var fileGeneratorSettings = new FileGeneratorSettings(); var expectedValue = "test"; //Act fileGeneratorSettings.outDirectory = expectedValue; fileGeneratorSettings.outFileExtension = expectedValue; fileGeneratorSettings.outFileNamePattern = expectedValue; //Assert Assert.Equal(fileGeneratorSettings.outDirectory, expectedValue); Assert.Equal(fileGeneratorSettings.outFileExtension, expectedValue); Assert.Equal(fileGeneratorSettings.outFileNamePattern, expectedValue); }
public FileGenerator(FileGeneratorSettings configuration, ILogger logger) { _configuration = configuration; _logger = logger; }
/// <summary> /// Applies generator-specific settings. /// </summary> public override void ApplySettings(FileGeneratorSettings settings) { }
public FileGenerator() { _configuration = new FileGeneratorSettings(); _logger = new Mock <ILogger>(); _sut = new SalesProcessor.Infrastructure.FileGenerator.FileGenerator(_configuration, _logger.Object); }