Table of Contents

Interface IInvocation

Namespace
Moq
Assembly
Moq.dll

Provides information about an invocation of a mock object.

public interface IInvocation

Properties

Arguments

Gets the arguments of the invocation.

IReadOnlyList<object> Arguments { get; }

Property Value

IReadOnlyList<object>

Exception

Optional exception if the method invocation results in an exception being thrown.

Exception Exception { get; }

Property Value

Exception

IsVerified

Gets whether this invocation was successfully verified by any of the various Verify methods.

bool IsVerified { get; }

Property Value

bool

MatchingSetup

Gets the setup that matched this invocation (or null if there was no matching setup).

ISetup MatchingSetup { get; }

Property Value

ISetup

Method

Gets the method of the invocation.

MethodInfo Method { get; }

Property Value

MethodInfo

ReturnValue

The value being returned for a non-void method if no exception was thrown.

object ReturnValue { get; }

Property Value

object