ExpectedExceptionBaseAttribute.RethrowIfAssertException Method

Throws the exception again if it is an AssertFailedException or an AssertInconclusiveException.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Protected Sub RethrowIfAssertException ( _
    exception As Exception _
)
protected void RethrowIfAssertException(
    Exception exception
)
protected:
void RethrowIfAssertException(
    Exception^ exception
)
member RethrowIfAssertException : 
        exception:Exception -> unit 
protected function RethrowIfAssertException(
    exception : Exception
)

Parameters

  • exception
    Type: System.Exception
    The exception to throw if it is an assertion exception.

.NET Framework Security

See Also

Reference

ExpectedExceptionBaseAttribute Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace