Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public interface IMockMe
string Foo(int x, int y);
int Bar { get; set; }
public class StrictAndLooseMocking
public void LooseMocking()
var mockedInterface = Mock.Create<IMockMe>();
Mock.Arrange(() => mockedInterface.Foo(1, 2)).Returns("called!");
var x = mockedInterface.Bar;
Assert.AreEqual(0, x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment