public void DnsEntriesConfig_Given_Constructed_ShouldDefault_Entries()
    {
        // act
        var config = new DnsEntriesConfig();

        // assert
        Assert.NotNull(config);
        Assert.IsInstanceOf <DnsUpdaterEntry[]>(config.Entries);
        Assert.AreEqual(0, config.Entries.Length);
    }
Esempio n. 2
0
    public ConfigService(IServiceProvider serviceProvider)
    {
        _logger      = serviceProvider.GetRequiredService <ILoggerAdapter <ConfigService> >();
        _path        = serviceProvider.GetRequiredService <IPathAbstraction>();
        _directory   = serviceProvider.GetRequiredService <IDirectoryAbstraction>();
        _file        = serviceProvider.GetRequiredService <IFileAbstraction>();
        _jsonHelper  = serviceProvider.GetRequiredService <IJsonHelper>();
        _dateTime    = serviceProvider.GetRequiredService <IDateTimeAbstraction>();
        _environment = serviceProvider.GetRequiredService <IEnvironmentAbstraction>();
        CoreConfig   = serviceProvider.GetRequiredService <DnsUpdaterConfig>();

        _dnsEntriesConfig = LoadConfiguration(CoreConfig);
    }