Same setup for many properties in Moq
Keeping code DRY is a noble goal, even for test code, but it's less important for tests. Our first priority when writing test code is being precise and clear. The tests are the specs and the specs are the tests. It's important that it be immediately clear what the state of the mocked object is. We can expect to duplicate a certain amount of code. 

Looking at your test, in isolation from your extension, it's difficult to tell exactly what is going on here. 


bool isDirty = false;
var product = new Mock&lt;IProduct&gt;();

product.As&lt;ISku&gt;().SetupDirtyProperty(x =&gt; x.Price, x =&gt; x.Price= It.IsAny&lt;decimal?&gt;(), () =&gt; isDirty = true);



If you need to create this same Moq for many tests, it would be better to use the [TestInitialize] attribute and have it set up prior to each test method being run. See this for more information.