Can I set a return value of a setter-less property of a stub that is created by Rhino.Mocks?
For example:
public interface IMyMachine { string myProperty { get; } }
...
IMyMachine m = MockRepository.GenerateMock<IMyMachine>();
// implement in a way so that m.myProperty will return "Ahoj!"
if (m.myProperty == "Ahoj!")
//do something
m.Expect(x => x.myProperty).Return("abc");
or if you use a stub:
var m = MockRepository.GenerateStub<IMyMachine>();
m.Stub(x => x.myProperty).Return("abc");