1 write to _commandResult
Microsoft.NET.TestFramework (1)
Assertions\CommandResultAssertions.cs (1)
16_commandResult = commandResult;
35 references to _commandResult
Microsoft.NET.TestFramework (35)
Assertions\CommandResultAssertions.cs (35)
21_commandResult.ExitCode.Should().Be(expectedExitCode, AppendDiagnosticsTo($"Expected command to exit with {expectedExitCode} but it did not.")); 27_commandResult.ExitCode.Should().Be(0, AppendDiagnosticsTo("Expected command to pass but it did not.")); 33_commandResult.ExitCode.Should().NotBe(0, AppendDiagnosticsTo("Expected command to fail but it did not.")); 39_commandResult.StdOut.Should().NotBeNullOrEmpty(AppendDiagnosticsTo("Command did not output anything to stdout")); 45_commandResult.StdOut.Should().NotBeNull() 52_commandResult.StdOut.Should().NotBeNull() 59_commandResult.StdOut.Should().NotBeNull(); 60predicate(_commandResult.StdOut).Should().BeTrue(AppendDiagnosticsTo($"The command output did not contain expected result: {description} {Environment.NewLine}")); 66_commandResult.StdOut.Should().NotBeNull(); 68string filteredStdOut = _commandResult.StdOut ?? string.Empty; 86_commandResult.StdOut.Should().NotBeNull(); 87string commandResultNoSpaces = _commandResult.StdOut.Replace(" ", ""); 94_commandResult.StdOut.Should().NotBeNull() 101_commandResult.StdOut.Should().NotBeNull(); 102Regex.Match(_commandResult.StdOut ?? string.Empty, pattern, options).Success.Should().BeTrue(AppendDiagnosticsTo($"Matching the command output failed. Pattern: {pattern}{Environment.NewLine}")); 108_commandResult.StdOut.Should().NotBeNull(); 109Regex.Match(_commandResult.StdOut ?? string.Empty, pattern, options).Success.Should().BeFalse(AppendDiagnosticsTo($"The command output matched a pattern it should not have. Pattern: {pattern}{Environment.NewLine}")); 115_commandResult.StdErr.Should().NotBeNullOrEmpty(AppendDiagnosticsTo("Command did not output anything to StdErr.")); 121_commandResult.StdErr.Should().NotBeNull() 122.And.Be(expectedOutput, AppendDiagnosticsTo($"Command did not output the expected output to StdErr.{Environment.NewLine}Expected: {expectedOutput}{Environment.NewLine}Actual: {_commandResult.StdErr}"), StringComparison.Ordinal); 128_commandResult.StdErr.Should().NotBeNull() 135var lines = _commandResult.StdErr?.Split(new[] { Environment.NewLine }, StringSplitOptions.None); 145_commandResult.StdErr.Should().NotBeNull() 152_commandResult.StdErr.Should().NotBeNull(); 153Regex.Match(_commandResult.StdErr ?? string.Empty, pattern, options).Success.Should().BeTrue(AppendDiagnosticsTo($"Matching the command error output failed. Pattern: {pattern}{Environment.NewLine}")); 159_commandResult.StdOut.Should().BeNullOrEmpty(AppendDiagnosticsTo($"Expected command to not output to stdout but it was not:")); 165_commandResult.StdErr.Should().BeNullOrEmpty(AppendDiagnosticsTo("Expected command to not output to stderr but it was not:")); 172$"Working Directory: {_commandResult.StartInfo?.WorkingDirectory}{Environment.NewLine}" + 173$"File Name: {_commandResult.StartInfo?.FileName}{Environment.NewLine}" + 174$"Arguments: {_commandResult.StartInfo?.Arguments}{Environment.NewLine}" + 175$"Exit Code: {_commandResult.ExitCode}{Environment.NewLine}" + 176$"StdOut:{Environment.NewLine}{_commandResult.StdOut}{Environment.NewLine}" + 177$"StdErr:{Environment.NewLine}{_commandResult.StdErr}{Environment.NewLine}"; ; 182_commandResult.StdOut.Should().Contain($"Project {skippedProject} ({frameworkFullName}) was previously compiled. Skipping compilation."); 189_commandResult.StdOut.Should().Contain($"Project {compiledProject} ({frameworkFullName}) will be compiled");