<PackageReference Include="NUnit" Version="3.7.0" />

TestCaseResult

public class TestCaseResult : TestResult
Represents the result of running a single test case.
using NUnit.Framework.Interfaces; using System.Collections.Generic; namespace NUnit.Framework.Internal { public class TestCaseResult : TestResult { public override int FailCount { get { if (base.ResultState.Status != TestStatus.Failed) return 0; return 1; } } public override int WarningCount { get { if (base.ResultState.Status != TestStatus.Warning) return 0; return 1; } } public override int PassCount { get { if (base.ResultState.Status != TestStatus.Passed) return 0; return 1; } } public override int SkipCount { get { if (base.ResultState.Status != TestStatus.Skipped) return 0; return 1; } } public override int InconclusiveCount { get { if (base.ResultState.Status != 0) return 0; return 1; } } public override bool HasChildren => false; public override IEnumerable<ITestResult> Children => new ITestResult[0]; public TestCaseResult(TestMethod test) : base(test) { } } }