Protected(T) Method

Moq

Collapse imageExpand ImageCopy imageCopyHover image
Enable protected setups for the mock.

Namespace: Moq.Protected
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.0.0)

Syntax

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

Parameters

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

Type Parameters

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

See Also