Example #1
0
 public void BeforeEach()
 {
     processShell = Mock.Of <IProcessShell>();
     Mock.Get(processShell).Setup(p => p.Execute(It.IsAny <IEnumerable <Command> >()))
     .Returns(() => new[] { nameof(configRepo) });
     repoCommandProcessor = new RepoCommandProcessor(processShell);
 }
 public void BeforeEach()
 {
     repoCommandProcessor           = new RepoCommandProcessorForTest();
     repoCommandProcessorController = new RepoCommandProcessorController(repoCommandProcessor);
     commands        = repoCommandProcessorController.CommonCommandActions;
     hasBeenExecuted = default;
     executionCount  = default;
 }
Example #3
0
        public RepoCommandProcessorController(IRepoCommandProcessor repoCommandProcessor)
        {
            if (repoCommandProcessor == default)
            {
                throw new ArgumentNullException(nameof(repoCommandProcessor));
            }

            this.repoCommandProcessor = repoCommandProcessor;

            CommonCommandActions = typeof(IRepoCommandProcessor)
                                   .GetMethods()
                                   .ToList();
        }