Skip to content

Instantly share code, notes, and snippets.

@davidpadbury
Created October 4, 2010 14:02
Show Gist options
  • Save davidpadbury/609728 to your computer and use it in GitHub Desktop.
Save davidpadbury/609728 to your computer and use it in GitHub Desktop.
void Main()
{
var testMock = new Mock<Test>();
testMock.SetupGet(m => m.IsSomething).Returns(true);
var test = testMock.Object;
Debug.Assert(test.IsSomethingTrue);
}
public abstract class TestBase
{
public virtual bool IsSomething { get; set; }
}
public class Test : TestBase
{
public bool IsSomethingTrue
{
get { return IsSomething == true; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment