Hello All

Please don't roll around laughing, please.

I have this code in some code I am trying to test and I want to mock it out 
so that he.SaveEntry does not get called.....

Dim he As New HistoryEntry(doc, historyentry)he.SaveEntry()


This is what I am trying to mock it out with but you guessed it SaveEntry() 
gets called and you end up in the database (scream).   Not a good place to 
be in a unit test.

Dim historyEntry As IHistoryEntry = MockRepository.GenerateMock(Of 
HistoryEntry)(parentContent, "test")

historyEntry.Stub(Sub() historyEntry.SaveEntry())


The background to this is that I am trying to see if I can unit test this 
code at all.  There is a huge amount of other stuff that I have mocked out 
and it's not nice.

regards

Peter

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rhinomocks.
For more options, visit https://groups.google.com/d/optout.

Reply via email to