Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public interface IMockMe
{
string Foo(int x, int y);
int Bar { get; set; }
}
[TestFixture]
public class StrictAndLooseMocking
{
[Test]
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