The expected invocation can happen at most once.

Namespace:  Moq.Language
Assembly:  Moq (in Moq.dll) Version: 3.0.204.1 (3.0.0.0)

Syntax

C#
IVerifies AtMostOnce()

Examples

CopyC#
var mock = new Mock<ICommand>();
mock.Setup(foo => foo.Execute("ping"))
    .AtMostOnce();

See Also