/// <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);
    }
Esempio n. 2
0
        /// <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;
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 public FileGenerator(FileGeneratorSettings configuration, ILogger logger)
 {
     _configuration = configuration;
     _logger        = logger;
 }
Esempio n. 6
0
 /// <summary>
 /// Applies generator-specific settings.
 /// </summary>
 public override void ApplySettings(FileGeneratorSettings settings)
 {
 }
Esempio n. 7
0
 public FileGenerator()
 {
     _configuration = new FileGeneratorSettings();
     _logger        = new Mock <ILogger>();
     _sut           = new SalesProcessor.Infrastructure.FileGenerator.FileGenerator(_configuration, _logger.Object);
 }