示例#1
0
 public Invocation()
 {
     this.looseMock  = new ThingMock(MockBehavior.Loose);
     this.strictMock = new ThingMock();
     this.strictMock.When(x => x.IntProperty).Return(42);
     this.strictMock.When(x => x.VoidNoArgMethod());
     this.strictMock.When(x => x.IntNoArgMethod()).Return(42);
     this.strictMock.When(x => x.IntSingleArgMethod(It.IsAny <float>())).Return(42);
     this.strictMock.When(x => x.IntMultiArgMethod(It.IsAny <float>(), It.IsAny <string>(), It.IsAny <int>(), It.IsAny <double>())).Return(42);
 }
示例#2
0
 public Specification()
 {
     this.mock             = new ThingMock();
     this.whenContinuation = this.mock.When(x => x.IntProperty);
 }
示例#3
0
 public Verification()
 {
     this.mock = new ThingMock(MockBehavior.Loose);
     this.verifyContinuation = this.mock.Verify(x => x.IntProperty);
 }
示例#4
0
 public Application()
 {
     this.mock = new ThingMock(MockBehavior.Loose);
 }