Stubs can do expectations and I've stumbled on this many times as have others...there are numerous threads about this and I believe this was not the original intended behavior but rather an evolution over time. That said, there has been significant discussion about moving away from the notion of "mocks" and "stubs" in RhinoMocks 4.0 to something a bit mroe clear.
On Mon, Dec 7, 2009 at 10:05 AM, bill richards <[email protected] > wrote: > I just modified the second test slightly, and it appears to indicate > that the Expectation was in fact realised. > > > [Test] > public void WhenUsingExpect_ShouldPassVerifyAllExpectations() > { > var child = MockRepository.GenerateStub<ITestChild>(); > child.Expect(c => c.SetParent > (Arg<ITestItem>.Is.Anything)); > > var item = new TestItem(child); > > child.VerifyAllExpectations(); > child.AssertWasCalled(c => c.SetParent(item)); > } > > -- > > 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.
