Ejemplo n.º 1
0
 public EngineBuilder()
 {
     _fileSystem          = Dummy.Of <IFileSystem>();
     _commandFactory      = new StubCommandFactory(new Command("dummy", passThroughArgs => passThroughArgs));
     _commandLineExecutor = Dummy.Of <ICommandLineExecutor>();
     _variableHelper      = new FakePassthroughVariableHelper();
 }
Ejemplo n.º 2
0
 public Engine(IFileSystem fileSystem, ICommandFactory commandFactory, ICommandLineExecutor commandLineExecutor,
               IVariableHelper variableHelper, ILogger logger, ISplashScreen splashScreen)
 {
     _fileSystem          = fileSystem;
     _commandFactory      = commandFactory;
     _commandLineExecutor = commandLineExecutor;
     _variableHelper      = variableHelper;
     _logger       = logger;
     _splashScreen = splashScreen;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Configures the cli.
        /// </summary>
        /// <param name="configurationBuilder">The configuration builder.</param>
        public void ConfigureCli(IConfigurationBuilder configurationBuilder)
        {
            var rocketHostBuilder = RocketHostExtensions.GetConventionalHostBuilder(_hostBuilder);
            var clb = new CommandLineBuilder(
                rocketHostBuilder.Scanner,
                rocketHostBuilder.AssemblyProvider,
                rocketHostBuilder.AssemblyCandidateFinder,
                rocketHostBuilder.Logger,
                rocketHostBuilder.Properties
                );

            _exec = clb.Build().Parse(_args ?? Array.Empty <string>());
            _args = _exec.ApplicationState.RemainingArguments ?? Array.Empty <string>();
            configurationBuilder.AddApplicationState(_exec.ApplicationState);
            rocketHostBuilder.Properties.Add(typeof(ICommandLineExecutor), _exec);
        }
Ejemplo n.º 4
0
 public StatsEnricher(IDiskIOWrapper ioWrapper,
                      IGitCommands gitCommands,
                      ILogger logger,
                      ICommandLineExecutor executor,
                      ICoverageProviderFactory providerFactory,
                      IPathValidator pathValidator,
                      ICoverageReportConverter converter)
 {
     _ioWrapper       = ioWrapper;
     _gitCommands     = gitCommands;
     _logger          = logger;
     _executor        = executor;
     _providerFactory = providerFactory;
     _pathValidator   = pathValidator;
     _converter       = converter;
 }
Ejemplo n.º 5
0
 public Runner(IDiskIOWrapper ioWrapper,
               IPathValidator pathValidator,
               IRepositorySnapshotBuilderWrapper builder,
               IStatsEnricher statsEnricher,
               ICoverageReportConverter converter,
               ILogger log,
               ISnapshotPersistence persistence,
               IProgressBarFactory progressBarFactory,
               ICommandLineExecutor executor,
               ISpinner spinner)
 {
     _ioWrapper          = ioWrapper;
     _pathValidator      = pathValidator;
     _builder            = builder;
     _statsEnricher      = statsEnricher;
     _converter          = converter;
     _log                = log;
     _persistence        = persistence;
     _progressBarFactory = progressBarFactory;
     _executor           = executor;
     _spinner            = spinner;
 }
Ejemplo n.º 6
0
 public TestContext(IDisposable disposer, ICommandLineExecutor executor)
 {
     _disposer = disposer;
     Executor  = executor;
 }
 public Runner(ICommandLineExecutor executor)
 {
     _executor = executor;
 }
Ejemplo n.º 8
0
 public EngineBuilder WithCommandLineExecutor(ICommandLineExecutor commandLineExecutor)
 {
     _commandLineExecutor = commandLineExecutor;
     return(this);
 }
Ejemplo n.º 9
0
 public GitCommands(ICommandLineExecutor commandLineExecutor)
 => _commandLineExecutor = commandLineExecutor;
Ejemplo n.º 10
0
 public CommandServiceProvider(ILogger <T> logger, ICommandLineExecutor executor, ICommandLineMapper mapper)
 {
     Logger   = logger;
     Executor = executor;
     Mapper   = mapper;
 }
Ejemplo n.º 11
0
 public GitClient(IProjectDirectoryProvider projectDirectoryProvider, ICommandLineExecutor commandLineExecutor, ILogger logger)
 {
     _projectDirectoryProvider = projectDirectoryProvider;
     _commandLineExecutor      = commandLineExecutor;
     _logger = logger;
 }
Ejemplo n.º 12
0
 public Program(IContainer container)
 {
     _container = container;
     _logger    = container.Resolve <ILogger <Program> >();
     _executor  = container.Resolve <ICommandLineExecutor>();
 }
 public ErroneusCommandLineExecutorDecorator(ICommandLineExecutor inner, int invocationToFailOn = 1)
 {
     _inner = inner;
     _invocationToFailOn = invocationToFailOn;
 }
Ejemplo n.º 14
0
 public RunnerBuilder With(ICommandLineExecutor executor)
 {
     _executor = executor;
     return(this);
 }