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("18.104.22.168")) .Returns(true); // Hand mock.Object as a collaborator and exercise it, // like calling methods on it... ILoveThisFramework lovable = mock.Object; bool download = lovable.DownloadExists("22.214.171.124"); // Verify that the given method was indeed called with the expected value at most once mock.Verify(p => p.DownloadExists("126.96.36.199"), Times.AtMostOnce());