Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ExpectedExceptionBaseAttribute.Verify Method (Exception)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

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

protected internal abstract void Verify(
	Exception exception
)

Parameters

exception
Type: System.Exception

The exception that is thrown by the unit test.

Determines whether the exception thrown is the expected exception. If the method returns, the exception was the expected exception. If the method throws an exception, the exception was not the expected exception. The message from the thrown exception is included in the test result. The Assert class can be used for convenience to throw an exception. If Assert.Inconclusive is used and the assertion statement is executed, the test outcome is set to Inconclusive.

Return to top
Show: