nsubstitute configure property code example
Example: nsubstitute configure property
The return value for a property can be set in the same way as for a method, using Returns(). You can also just use plain old property setters for read/write properties; they’ll behave just the way you expect them to.
calculator.Mode.Returns("DEC");
Assert.AreEqual(calculator.Mode, "DEC");
calculator.Mode = "HEX";
Assert.AreEqual(calculator.Mode, "HEX");