OneOf(T) Method

Moq

Collapse imageExpand ImageCopy imageCopyHover image
Creates an mock object of the indicated type.

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

Syntax

C#
public T OneOf<T>()
where T : class

Type Parameters

T
The type of the mocked object.

Return Value

The mocked object created.

See Also