I've done some crazy stuff with testing and generally the guidelines tend to be dead on...ie. don't hit disk.
A question I would ask back to you is why do you need to simulate a ton of records being returned in a unit-test scenario? If you want to test flows and workflow why do I need 10s, 100s or 1000s of records? If the "many records" requirement bleeds into too many components it may indicate you have an issue with your code. Good questions.... On Wed, Feb 4, 2009 at 5:10 AM, HP <[email protected]> wrote: > > Hi there > > I'd like to ask a rather general question related to unit testing and > mocks. Let say I want to test the workflow of processing an object > which is a result of some search. Search takes time, so testing it may > be cumbersome - I guess it's an ideal case for mocks. But typical > search results object may be huge - it contains a lot of results each > containg some data. > > My question is - is there such a practice to just run the search once, > serialize the heavy object to the disk, and then, in unit tests, just > deserialize it and have instantly a real object without almost any > hassle? > > thanks for any insight > HP > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
