Beispiel #1
0
        public void SetUp()
        {
            _fileSystem = new MockFileSystem(new Dictionary <string, MockFileData>
            {
                { @"C:\build\MySolution.sln", new MockFileData(string.Empty) }
            });

            _repositoryReader = new Mock <IRepositoryReader>();
            _analyzer         = new Mock <IMSBuildSolutionAnalyzer>();
            var container = ContainerHelper.ConfigureContainer()
                            .WithRegistrations(c =>
            {
                c.RegisterInstance <IFileSystem>(_fileSystem);
                c.RegisterInstance(_repositoryReader.Object);
                c.RegisterInstance(_analyzer.Object);
            })
                            .Build();

            _args = new string[]
            {
                "--solution", @"C:\build\MySolution.sln",
                "--from-commit", "commit"
            };
            _command = container.Resolve <ArbiterRootCommand>();
            _console = container.Resolve <IConsole>();
        }
Beispiel #2
0
 public Program(ArbiterRootCommand rootCommand, IConsole console, ILogger log)
 {
     _rootCommand = rootCommand;
     _console     = console;
     _log         = log;
 }