Protected(T) Method

Moq 2.6

Enable protected expectations for the mock.

Namespace:  Moq.Protected
Assembly:  Moq (in Moq.dll) Version: 2.6.1014.1 (2.6.0.0)

Syntax

C#
public static IProtectedMock Protected<T>(
	Mock<T> mock
)
where T : class

Parameters

mock
Type: Moq..::.Mock<(Of <(T>)>)
The mock to set the protected expectations on.

Type Parameters

T
Mocked object type. Typically omitted as it can be inferred from the mock instance.

See Also