Either I would have to rely on other code (for which, shame on me, I haven't written tests), or generate the objects "by hand". I don't really want to do the later as I need 15 parameters per input object and 4 or 5 objects.
IMO the safer way to do this is to create your 4-5 objects by hand. This way you are sure your test input is correctly formed. I assume these 4-5 objects are instances of already written classes, and the 15 parameters they need are all plain perl data types and not objects themselves. If that is the case then I think you will find the quickest way (and again IMO the safest way) to do this will be to do it by hand. Any other code you write to create these object will need to be tested (more testing time), or using Test::MockObject (more learning time).
Also I am not sure Test::MockObject is what you are looking for. Test::MockObject can be used to 'fake' an instance of a complex or resource intensive object which would require too much set-up or management code to have for real.
In reply to Re: Testing with non-trivial input
by stvn
in thread Testing with non-trivial input
by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |