Пример #1
0
        public void Execute_InvalidBatchWithoutArguments_Exception()
        {
            var processInfo = Mock.Of<IRunCommand>
            (
                c => c.Argument == string.Empty
                  && c.FullPath == FullPathInvalid
                  && c.TimeOut == 1000
            );

            var command = new RunCommand(processInfo);
            Assert.Throws<InvalidProgramException>(() => command.Execute());
        }
Пример #2
0
        public void Execute_InvalidBatchWithoutArgumentsNoWait_Success()
        {
            var processInfo = Mock.Of<IRunCommand>
            (
                c => c.Argument == string.Empty
                  && c.FullPath == FullPath
                  && c.TimeOut == 0
            );

            var command = new RunCommand(processInfo);
            command.Execute();
            Assert.Pass();
        }
Пример #3
0
        public void Execute_ExistingBatchWithoutArguments_Executed()
        {
            var processInfo = Mock.Of<IRunCommand>
            (
                c =>c.Argument == string.Empty
                  && c.FullPath == FullPath
                  && c.TimeOut == 1000
            );

            var command = new RunCommand(processInfo);
            command.Execute();

            Assert.That(File.Exists(TARGET_FILE), Is.True);
        }