Verifiable Method

Moq

Collapse image Expand Image Copy image CopyHover image
Marks the expectation as verifiable, meaning that a call to Verify()()()() will check if this particular expectation was met.

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

Syntax

C#
void Verifiable()

Examples

The following example marks the expectation as verifiable:
CopyC#
mock.Expect(x => x.Execute("ping"))
    .Returns(true)
    .Verifiable();

See Also