Пример #1
0
 public RepeatExample()
 {
     this.sut = MockRepository.GenerateStub<ISimpleModel>();
     this.sut.Stub(x => x.Do()).Return(1).Repeat.Once();
     this.sut.Stub(x => x.Do()).Return(2).Repeat.Twice();
     this.sut.Stub(x => x.Do()).Return(3).Repeat.Times(3);
     this.sut.Stub(x => x.Do()).Return(4).Repeat.Times(4);
 }
Пример #2
0
 public RepeatExample()
 {
     this.sut = MockRepository.GenerateStub <ISimpleModel>();
     this.sut.Stub(x => x.Do()).Return(1).Repeat.Once();
     this.sut.Stub(x => x.Do()).Return(2).Repeat.Twice();
     this.sut.Stub(x => x.Do()).Return(3).Repeat.Times(3);
     this.sut.Stub(x => x.Do()).Return(4).Repeat.Times(4);
 }
Пример #3
0
 public LiteralExample()
 {
     this.sut = MockRepository.GenerateStub <ISimpleModel>();
     this.sut.Stub(x => x.Do(1)).Return(1);
     this.sut.Stub(x => x.Do("Foo")).Return(2);
 }
Пример #4
0
 public DecoratorSimpleModel(ISimpleModel decorated)
 {
     _decorated = decorated;
 }
Пример #5
0
 public ASimpleStub()
 {
     this.sut = MockRepository.GenerateStub <ISimpleModel>();
     this.sut.Stub(x => x.Do()).Return(1);
 }
Пример #6
0
 public LiteralExample()
 {
     this.sut = MockRepository.GenerateStub<ISimpleModel>();
     this.sut.Stub(x => x.Do(1)).Return(1);
     this.sut.Stub(x => x.Do("Foo")).Return(2);
 }
Пример #7
0
 void Constructor(Text message, Button button, ISimpleModel simpleModel)
 {
     _message     = message;
     _button      = button;
     _simpleModel = simpleModel;
 }
Пример #8
0
 public ASimpleStub()
 {
     this.sut = MockRepository.GenerateStub<ISimpleModel>();
     this.sut.Stub(x => x.Do()).Return(1);
 }