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 RepoCommandProcessor(IProcessShell processShell) { if (processShell == null) { throw new ArgumentException($"[{nameof(RepoCommandProcessor)}] ->Argument {processShell} can not be null!", nameof(processShell)); } this.processShell = processShell; }