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

TestCaseParameters

The TestCaseParameters class encapsulates method arguments and other selected parameters needed for constructing a parameterized test case.
using NUnit.Framework.Interfaces; using System; using System.Runtime.CompilerServices; namespace NUnit.Framework.Internal { public class TestCaseParameters : TestParameters, ITestCaseData, ITestData, IApplyToTest { [System.Runtime.CompilerServices.Nullable(2)] private object _expectedResult; [System.Runtime.CompilerServices.Nullable(2)] public object ExpectedResult { [System.Runtime.CompilerServices.NullableContext(2)] get { return _expectedResult; } [System.Runtime.CompilerServices.NullableContext(2)] set { _expectedResult = value; HasExpectedResult = true; } } public bool HasExpectedResult { get; set; } [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] public Type[] TypeArgs { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] set; } public TestCaseParameters() { } [System.Runtime.CompilerServices.NullableContext(1)] public TestCaseParameters(Exception exception) : base(exception) { } public TestCaseParameters([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 2 })] object[] args) : base(args) { } [System.Runtime.CompilerServices.NullableContext(1)] public TestCaseParameters(ITestCaseData data) : base(data) { if (data.HasExpectedResult) ExpectedResult = data.ExpectedResult; } } }