MultipleAssertException
Thrown when an assertion failed.
using NUnit.Framework.Interfaces;
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace NUnit.Framework
{
[Serializable]
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class MultipleAssertException : ResultStateException
{
public override ResultState ResultState => ResultState.Failure;
public ITestResult TestResult { get; }
public MultipleAssertException(ITestResult testResult)
: base(testResult.Message)
{
Guard.ArgumentNotNull(testResult, "testResult");
TestResult = testResult;
}
protected MultipleAssertException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}