public void Setter_Expectation_With_Custom_Ignore_Arguments() { IBar bar = MockRepository.Mock <IBar>(); bar.ExpectProperty(x => x.Foo = Arg <int> .Is.Anything); bar.Foo = 2; bar.VerifyAllExpectations(); }
public void Setter_Expectation_Not_Fullfilled() { IBar bar = MockRepository.Mock <IBar>(); bar.ExpectProperty(x => x.Foo = Arg <int> .Is.Anything); Assert.Throws <ExpectationViolationException>( () => bar.VerifyAllExpectations()); }
public void Setter_Expectation_With_Custom_Ignore_Arguments() { IBar bar = MockRepository.Mock <IBar>(); bar.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault); bar.ExpectProperty(x => x.Foo = Arg <int> .Is.Anything); bar.Foo = 2; bar.VerifyAllExpectations(); }
public void TestMethodWhereALocalStubIsInvokedWithVerifyAllExpectations() { IBar localStub = MockRepository.GenerateStub <IBar>(); localStub.VerifyAllExpectations(); }
public void TestMethodWhereTwoFieldStubsAreInvokedWithVerifyAllExpectations() { _barStub.VerifyAllExpectations(); _barStubTwo.VerifyAllExpectations(); }
public void TestMethodWhereAFieldStubIsInvokedWithVerifyAllExpectations() { _barStub.VerifyAllExpectations(); }