Partilhar via


ExpectedExceptionBaseAttribute.Verify(Exception) Method

Definition

Determines whether the exception is expected. If the method returns, then it is understood that the exception was expected. If the method throws an exception, then it is understood that the exception was not expected, and the thrown exception's message is included in the test result. The Assert class can be used for convenience. If Inconclusive() is used and the assertion fails, then the test outcome is set to Inconclusive.

protected public:
 abstract void Verify(Exception ^ exception);
protected internal abstract void Verify (Exception exception);
abstract member Verify : Exception -> unit
Protected Friend MustOverride Sub Verify (exception As Exception)

Parameters

exception
Exception

The exception thrown by the unit test

Applies to