public void ItShouldAcceptProcessStartInformationAsParameter() { var processStartSpecification = new Mock<IProcessStartSpecification>(); var storage = new Mock<IStorage>(); storage.Setup(x => x.ExistsInStorage(It.IsAny<string>())).Returns(true); var notifiers = new[] {new Mock<INotifier>().Object}; var consoleProcessRunner = new ConsoleProcessRunner(processStartSpecification.Object, storage.Object, notifiers); Assert.That(consoleProcessRunner.ProcessStartInfo, Is.Not.Null); }
public static void Main(string[] args) { var settings = new Settings(); var spec = new ProcessStartSpecification(args, settings); var notifiers = new List<INotifier> {new ConsoleNotifier(), new EmailNotifier(settings), new FileNotifier()}; var storage = new HdStorage(); var runner = new ConsoleProcessRunner(spec, storage, notifiers); var process = new ExternalProcess(); runner.Start(process); }