There are subtle differences (most of which escape me at the moment). However you are correct that the notion of a stub and mock as they relate to RhinoMocks has converged over the years. In the next version of RhinoMocks we're planning to explore the notion of making the two concepts one or at the very least making the distinctions more clear.
Tim On Thu, Nov 26, 2009 at 2:53 PM, changhong <[email protected]> wrote: > I use AAA syntax, and I couldn't find any difference between objects > created by MockRepository.GenerateMock<T> or > MockRepository.GenerateStub<T>. > > I noticed with both objects, you can setup stubs or expectations using > obj.Stub(..) or obj.Expect(...), for both objects, test won't fail if > an expectation does not happen. Also with both objects, you can verify > an expectation using obj.AssertWasCalled(...), and they behave the > same. > > Can anyone tell me what the difference between those two? And how > should I choose one over another? > > Manny Thanks. > > -- > > 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]<rhinomocks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rhinomocks?hl=en. > > > -- Tim Barcz Microsoft C# MVP Microsoft ASPInsider http://timbarcz.devlicio.us http://www.twitter.com/timbarcz -- 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.
