Verify property is never set using Moq [duplicate]
This question already has answers here : Closed 7 years ago . Possible Duplicate: Moq - How to verify that a property value is set via the setter I would expect the following test to fail: public interface IObjectWithProperty { int Property { get; set; } } [TestMethod] public void Property_ShouldNotBeCalled() { var mock = new Mock<IObjectWithProperty>(); mock.Object.Property = 10; mock.Verify(x => x.Property, Times.Never()); } However, this test passes, even though Property is clearly accessed on the line before the Verify . So it seems that Verify actually means VerifyGet . How should I