src/NUnit/Core/src/Api/ITestResultExtensions.cs
/// <summary>
/// Generates an human readable summary report.
/// </summary>
/// <param name="result"></param>
/// <returns>
/// The result report generated from
/// <see cref="TextUI.DisplaySummaryReport(ResultSummary)"/>.
/// </returns>
Generates an human readable summary report.
Generates an human readable summary report .
[return: NotNullIfNotNull("result")]
        public static string? GenerateSummaryReport(this ITestResult? result)
        {
            if (result is null) {
                return null;
            }
            using var stringWriter = new StringWriter();
            var textUI = new TextUI(new ExtendedTextWrapper(stringWriter), reader: null, new NUnitLiteOptions());
            textUI.DisplaySummaryReport(new ResultSummary(result));
            return stringWriter.GetStringBuilder().ToString();
        }
[ return : NotNullIfNotNull ( " " ) ] public static string ? GenerateSummaryReport ( this ITestResult ? result ) { if ( result is null ) { return null ; } using var stringWriter = new StringWriter ( ) ; var textUI = new TextUI ( new ExtendedTextWrapper ( stringWriter ) , reader : null , new NUnitLiteOptions ( ) ) ; textUI . DisplaySummaryReport ( new ResultSummary ( result ) ) ; return stringWriter . GetStringBuilder ( ) . ToString ( ) ; }
Generates an human readable summary report.
Generates an human readable summary report .
The result report generated from
.
The result report generated from .
ITestResult?
this
result
None