This example is taken directly from the moq4 github repo. It should be enough to give you an idea of how to use mock. If more details are needed review the moq github repo link above.
var mock = new Mock<ILoveThisFramework>(); // WOW! No record/replay weirdness?! :) mock.Setup(p => p.DownloadExists("184.108.40.206")) .Returns(true); // Hand mock.Object as a collaborator and exercise it, // like calling methods on it... ILoveThisFramework lovable = mock.Object; bool download = lovable.DownloadExists("220.127.116.11"); // Verify that the given method was indeed called with the expected value at most once mock.Verify(p => p.DownloadExists("18.104.22.168"), Times.AtMostOnce());