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