Holy cow Stefan, you're a champ over there on StackOverflow!!

On Fri, Sep 18, 2009 at 3:24 AM, Stefan Steinegger <
[email protected]> wrote:

>
> I actually thought that Repeat in AssertWasCalled is working as
> expected.
>
> On 18 Sep., 10:12, Stefan Steinegger <[email protected]>
> wrote:
> > Repeat is an ongoing topic on Rhino, because it does not behave as
> > expected, but this is by specification.
> >
> > There is an explanation on stackoverflow:
> http://stackoverflow.com/questions/887245/rhino-mocks-repeat-once-not...
> >
> > by the way: why do you call Expect AND AssertWasCalled? Usually you
> > call
> > - Exect and later VerfiyAllExpectations
> > - OR Stub (if needed) and later AssertWasCalled
> >
> > On 16 Sep., 21:14, Tarpan <[email protected]> wrote:
> >
> > > Hi,
> >
> > > Does anybody know, is there any fix or workaround for "Repeat.Times
> > > (x)" not working with AAA syntax in 3.5?
> >
> > > Code (sorry for VB code - employer requirement):
> > > ---------------
> > >     <Test()> _
> > >     Public Sub DataProviderLoader_Test1()
> > >         DPRepository.Expect(Function(DPR) Check_Add
> > > (DPR)).IgnoreArguments.Repeat.Once()
> > >         DataProviderLoader.CreateDataProviders(DataDictionary,
> > > DPRepository, SqlRunner)
> > >         DPRepository.AssertWasCalled(Function(DPR) Check_Add(DPR),
> > > Function(options) options.IgnoreArguments.Repeat.Once)
> > >     End Sub
> > > ---------------
> >
> > > 1st Line  - DPRepository.Expect() - set expectation to be called just
> > > once
> > > 3rd Line  - DPRepository.AssertWasCalled() - verifies that the sub was
> > > called just once
> >
> > > The sub called twice (guaranteed) and test completes just fine!
> >
> > > Thanks for responses
> > > Tarpan
> >
> > > PS. I can not figure out how to use "Repeat" in 3.6. Can anybody show
> > > me an example?
> >
>


-- 
Tim Barcz
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to