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; }
public RepoCommandProcessorController(IRepoCommandProcessor repoCommandProcessor) { if (repoCommandProcessor == default) { throw new ArgumentNullException(nameof(repoCommandProcessor)); } this.repoCommandProcessor = repoCommandProcessor; CommonCommandActions = typeof(IRepoCommandProcessor) .GetMethods() .ToList(); }