[Test] [ExpectedException(typeof(MockException))] public void Prig_should_assert_property_set() { using (new IndirectionsContext()) { // Arrange var fooProxy = new PProxyFoo(); var fooPropSetMock = new Mock<IndirectionAction<Foo, string>>(MockBehavior.Strict); fooPropSetMock.Setup(_ => _(fooProxy, "ping")); fooProxy.FooPropSetString().Body = fooPropSetMock.Object; var foo = (Foo)fooProxy; // Act, Assert foo.FooProp = "foo"; } }