ExceptionAssertExtensions.

IsInvalidOperationException(Exception, string) Method

Summary

Checks if an exception is of type System.InvalidOperationException.

Syntax

public static void IsInvalidOperationException(this Exception exception, string message)

Attributes

Type Description
AssertionMethodAttribute Attribute for marking custom assertion methods.

Parameters

Name Type Description
exception Exception Exception to check.
message string Expected exception message.

Return Value

Type Description
void
GitHub