Not sure if this is meaningful to our conversation or not, but I took your suggestion and tried it without the .stub call and it still failed however, the following did pass without the .stub call:
mainProcessing.CreateJobQueueForPatientNotInPm(stubbedJobQueue); stubbedJobQueue.AssertWasCalled(x => x.AddNewJobQueueRow(4, new SortedList())); So it recognizes that the AddNewJobQueueRow method was called, it just can't pattern match on the arguments I'm expecting from the call when I use a stub. More specifically, it can't match on the SortedList argument, it can match on the literal int just fine. Still unsure as to why, but at least I'm a little further down the rabbit hole than I used to be. Thanks On Apr 29, 9:09 am, Patrick Steele <[email protected]> wrote: > I do see where there is some confusion. But from my perspective (the > way I've used RhinoMocks), it doesn't make much sense to Stub a void > method on an interface (unless I have specific processing to do). If > you just want to make sure a method was called ("AssetWasCalled"), why > stub out its implementation if it's void and doesn't need to return a > canned response? > > I think your first example would work if you removed the .Stub call. > > --- > Patrick Steelehttp://weblogs.asp.net/psteele > > > > > > On Thu, Apr 29, 2010 at 9:12 AM, NateGQG <[email protected]> wrote: > > Yes it helps. > > > And you are correct, we are stubbing the IJobQueue and using depency > > injection so we can test various parts of the main processing class, > > so the AddNewJobQueueRow method is called from > > CreateJobQueueForCustomer method. > > > However, I still have one question, isn't the method AddNewJobQueueRow > > still getting called whether I stub it or create an expectation for > > it? To me, whether Rhino Mocks intercepts it and executes my stubbed > > implementation or the actual original implementation is used, the > > method is still getting called. So from Rhino Mock's perspective, > > providing a stub for a method and then executing that stub is not the > > same as executing the actual method when we're testing for > > AssertWasCalled? > > > Nate > > > -- > > 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 > > athttp://groups.google.com/group/rhinomocks?hl=en. > > -- > 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 > athttp://groups.google.com/group/rhinomocks?hl=en.- Hide quoted text - > > - Show quoted text - -- 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.
