Exemple #1
0
            public void Should_Proxy_Call_To_ScriptRunner()
            {
                // Given
                var fixture = new DebugCommandFixture();
                var runner  = fixture.ScriptRunner;
                var options = fixture.Options;

                // When
                fixture.Execute();

                // Then
                runner.Received(1).Run(Arg.Any <BuildScriptHost>(), options.Script, options.Arguments);
            }
Exemple #2
0
            public void Should_Throw_If_Options_Is_Null()
            {
                // Given
                var fixture = new DebugCommandFixture();

                fixture.Options = null;

                // When
                var result = Record.Exception(() => fixture.Execute());

                // Then
                Assert.IsArgumentNullException(result, "options");
            }
Exemple #3
0
            public void Should_Report_Correct_Process_Id()
            {
                // Given
                var fixture  = new DebugCommandFixture();
                var debugger = fixture.Debugger;
                var log      = fixture.Log;
                var pid      = 1234567;

                debugger.GetProcessId().Returns(pid);

                // When
                fixture.Execute();

                // Then
                log.Received(1).Information(Verbosity.Quiet, Arg.Any <string>(), pid);
            }