public void Setup()
        {
            _separator = EnvUtils.EnvVariableSeparator.ToString();

            _environment = Substitute.For <IEnvironmentAbstraction>();
            _provider    = new EnvironmentPathsProvider(_environment);
        }
示例#2
0
 public GenerateHandler(GenerateOptions options,
                        ILog log,
                        IEnvironmentAbstraction environment,
                        IFileSystem fileSystem,
                        IGitHubClient gitHubClient,
                        IMarkdownParser markdownParser) : base(options, log, environment, fileSystem, gitHubClient,
                                                               markdownParser)
 {
 }
示例#3
0
        public PathBuilder(
            ILoggerAdapter <PathBuilder> logger,
            IEnvironmentAbstraction environment,
            GrafanaCliConfig config)
        {
            // TODO: [TESTS] (PathBuilder.PathBuilder) Add tests
            _logger = logger;

            _rootDirectory = config.DataDirectory
                             .Replace("./", environment.CurrentDirectory.AppendIfMissing("\\"))
                             .AppendIfMissing("\\");
        }
示例#4
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);
    }
        protected VerbHandler(T options,
                              ILog log,
                              IEnvironmentAbstraction environment,
                              IFileSystem fileSystem,
                              IGitHubClient gitHubClient,
                              IMarkdownParser markdownParser)
        {
            Options           = options;
            this.gitHubClient = gitHubClient;
            Log = log;

            this.environment    = environment;
            this.markdownParser = markdownParser;
            this.fileSystem     = fileSystem;
        }
示例#6
0
        public CsvMetricOutput(
            ILoggerAdapter <CsvMetricOutput> logger,
            IDirectoryAbstraction directory,
            IEnvironmentAbstraction environment,
            IDateTimeAbstraction dateTime,
            IPathAbstraction path,
            IFileAbstraction file,
            IConfiguration configuration)
        {
            // TODO: [TESTS] (CsvMetricOutput) Add tests
            _logger      = logger;
            _directory   = directory;
            _environment = environment;
            _dateTime    = dateTime;
            _path        = path;
            _file        = file;
            _config      = BindConfiguration(configuration);

            Name    = nameof(CsvMetricOutput);
            Enabled = _config.Enabled;

            ProcessConfig();
        }
 public EnvironmentPathsProvider(IEnvironmentAbstraction environment)
 {
     _environment = environment;
 }
 public void Setup()
 {
     _fileSystem  = Substitute.For <IFileSystem>();
     _environment = Substitute.For <IEnvironmentAbstraction>();
 }
 public SshPathLocator(IFileSystem fileSystem, IEnvironmentAbstraction environment)
 {
     _fileSystem  = fileSystem;
     _environment = environment;
 }
 public SessionPersistor(IEnvironmentAbstraction environmentAbstraction)
 {
     _environmentAbstraction = environmentAbstraction;
 }
示例#11
0
 public LoginExecutor(IPr0grammApi pr0grammApi, IEnvironmentAbstraction envAbstraction, IFileSystemPersistor <Session> sessionPersistor)
 {
     _pr0grammApi      = pr0grammApi;
     _envAbstraction   = envAbstraction;
     _sessionPersistor = sessionPersistor;
 }