Hello,

I have rewritten every exemple in the documentation exemple by using
AAA syntax (arrange, act, assert).
There is one things I don't understand.

What is the difference between the t.Stub<> and t.Expect<> ?

According to the documentation comments in RhinoMocksExtention.cs,
Stub doesn't create any expectation.

What does it means ?
Do you have an article to detail what is the expectation contest ?


One exemple to illustrate my question with Expect :

        [Test]
        public void setReturnValueWhateverArguments_AAA()
        {
            //Assert
            this.view.Replay();
            this.view.Expect(v => v.Ask(null, null)).Return
(null).IgnoreArguments();

            //Act
            object obj = this.view.Ask("1", null);

            //Assert
            Assert.AreEqual(null, obj);
            this.view.VerifyAllExpectations();
        }

One exemple to illustrate my question with Stub:

        [Test]
        public void setReturnValueWhateverArguments_AAA()
        {
            //Assert
            this.view.Replay();
            this.view.Stub(v => v.Ask(null, null)).Return
(null).IgnoreArguments();

            //Act
            object obj = this.view.Ask("1", null);

            //Assert
            Assert.AreEqual(null, obj);
            this.view.VerifyAllExpectations();//I think this line is
not important in this case
        }

Is there any difference on the interpretation ?

Do you have any article about this topic ?

Regards,
Fabien Arcellier

--

You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.


Reply via email to