举个例子:
public interface ICar { string Model {get;set;} void Horn();} ICar stubCar= MockRepository.GenerateStub<ICar>();stubCar.Expect(c=>c.Horn()).Return( //now what so that // it returns nothing as the meth. returns void ?
您只需要Expect电话.