Exemplo n.º 1
0
            protected override Process StartProcess(ProcessStartInfo startInfo)
            {
                if (debuggerSetup != null)
                {
                    IDebugger debugger = new DefaultDebuggerManager().GetDebugger(debuggerSetup, logger);
                    Process process = debugger.LaunchProcess(startInfo);
                    if (process != null)
                        return process;
                }

                return base.StartProcess(startInfo);
            }
        public void GetDebugger_WhenLoggerIsNull_Throws()
        {
            var manager = new DefaultDebuggerManager();

            Assert.Throws<ArgumentNullException>(() => manager.GetDebugger(new DebuggerSetup(), null));
        }
        public void GetDebugger_WhenArgumentsValid_ReturnsADebugger()
        {
            var manager = new DefaultDebuggerManager();

            Assert.IsNotNull(manager.GetDebugger(new DebuggerSetup(), MockRepository.GenerateStub<ILogger>()));
        }
        public void GetDebugger_WhenDebuggerSetupIsNull_Throws()
        {
            var manager = new DefaultDebuggerManager();

            Assert.Throws<ArgumentNullException>(() => manager.GetDebugger(null, MockRepository.GenerateStub<ILogger>()));
        }