Moq: Verify that a method is not called


/ Published in: C#
Save to your folder(s)

Verify that the Execute("ping") method is never called.


Copy this code and paste it in your HTML
  1. mock.Verify(foo => foo.Execute("ping"), Times.Never());

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.