Moq.Protected Namespace

Moq 2.6

Importing this namespace will enable the Protected() method on mocks, enabling expectations on protected members by specifying the member name as a string.

Classes

  ClassDescription
ItExpr
Allows the specification of a matching condition for an argument in a protected member expectation, rather than a specific argument value. "ItExpr" refers to the argument being matched.
ProtectedExtension
Enables the Protected() method on Mock<(Of <(T>)>), allowing expectations to be set for protected members by using their name as a string, rather than strong-typing them which is not possible due to their visibility.

Interfaces

  InterfaceDescription
IProtectedMock
Allows expectations to be set for protected members by using their name as a string, rather than strong-typing them which is not possible due to their visibility.