public void Setup()
        {
            if (Directory.Exists(DirectoryNameTest))
                Directory.Delete(DirectoryNameTest, true);

            logger = Substitute.For<ILogger>();
            processCaller = new ProcessCaller(logger);
        }
        public void ShouldThrowEventWithOutputFromProcess()
        {
            processCaller = new ProcessCaller(logger);

            processCaller.ExecuteSync("cmd.exe", "/c dir", string.Empty);

            logger.ReceivedWithAnyArgs()
                  .Info(null);
        }
        public void ShouldThrowEventWithOutputErrorFromProcess()
        {
            processCaller = new ProcessCaller(logger);

            processCaller.ExecuteSync("cmd.exe", "/c no_commande_xist", string.Empty);

            logger.ReceivedWithAnyArgs()
                  .Error(null);
        }