diff --git a/src/bunit.core/Asserting/ActualExpectedAssertException.cs b/src/bunit.core/Asserting/ActualExpectedAssertException.cs index 4a75fdc18..498d302eb 100644 --- a/src/bunit.core/Asserting/ActualExpectedAssertException.cs +++ b/src/bunit.core/Asserting/ActualExpectedAssertException.cs @@ -1,10 +1,12 @@ +using Bunit.Internal.XUnitExceptions; + namespace Bunit.Asserting; /// /// Represents a generic assert exception used when an actual result does not match an expected result. /// [Serializable] -public class ActualExpectedAssertException : Exception +public class ActualExpectedAssertException : Exception, IAssertionException { /// /// Initializes a new instance of the class. diff --git a/src/bunit.core/Extensions/WaitForHelpers/WaitForFailedException.cs b/src/bunit.core/Extensions/WaitForHelpers/WaitForFailedException.cs index 3b9a8fc25..d84d68cb9 100644 --- a/src/bunit.core/Extensions/WaitForHelpers/WaitForFailedException.cs +++ b/src/bunit.core/Extensions/WaitForHelpers/WaitForFailedException.cs @@ -1,10 +1,12 @@ +using Bunit.Internal.XUnitExceptions; + namespace Bunit.Extensions.WaitForHelpers; /// /// Represents an exception thrown when the does not complete successfully. /// [Serializable] -public sealed class WaitForFailedException : Exception +public sealed class WaitForFailedException : Exception, ITestTimeoutException { /// /// Initializes a new instance of the class. diff --git a/src/bunit.core/Internal/XUnitExceptions/IAssertionException.cs b/src/bunit.core/Internal/XUnitExceptions/IAssertionException.cs new file mode 100644 index 000000000..bf8db4fd1 --- /dev/null +++ b/src/bunit.core/Internal/XUnitExceptions/IAssertionException.cs @@ -0,0 +1,6 @@ +namespace Bunit.Internal.XUnitExceptions; + +/// +/// This is a marker interface for xUnit.v3 that will cause xUnit to consider the failure cause to be an assertion failure. +/// +internal interface IAssertionException; diff --git a/src/bunit.core/Internal/XUnitExceptions/ITestTimeoutException.cs b/src/bunit.core/Internal/XUnitExceptions/ITestTimeoutException.cs new file mode 100644 index 000000000..aec0961ea --- /dev/null +++ b/src/bunit.core/Internal/XUnitExceptions/ITestTimeoutException.cs @@ -0,0 +1,6 @@ +namespace Bunit.Internal.XUnitExceptions; + +/// +/// This is a marker interface for xUnit.v3 that will cause xUnit to consider the failure cause to be a timeout. +/// +internal interface ITestTimeoutException; diff --git a/src/bunit.core/ParameterException.cs b/src/bunit.core/ParameterException.cs index 66ab60a14..dd9cee220 100644 --- a/src/bunit.core/ParameterException.cs +++ b/src/bunit.core/ParameterException.cs @@ -1,7 +1,7 @@ namespace Bunit.RazorTesting; /// -/// Represents an missing or invalid Blazor parameter on a Blazor component. +/// Represents a missing or invalid Blazor parameter on a Blazor component. /// [Serializable] public sealed class ParameterException : ArgumentException diff --git a/src/bunit.web/Extensions/ElementRemovedFromDomException.cs b/src/bunit.web/Extensions/ElementRemovedFromDomException.cs index 6bc370599..4b0cf2db0 100644 --- a/src/bunit.web/Extensions/ElementRemovedFromDomException.cs +++ b/src/bunit.web/Extensions/ElementRemovedFromDomException.cs @@ -2,7 +2,7 @@ namespace Bunit; /// /// Represents an exception that is thrown when trying to access an element -/// that was previous found in the DOM. +/// that was previously found in the DOM. /// [Serializable] public sealed class ElementRemovedFromDomException : ElementNotFoundException