Hello all,
I want to write a test for method which is going to extract part of an XML file. The input for this is an array of objects which I generate by parsing a CSV file and creating an object for each line.
My problem is that I am daunted by the setting up the intial conditions for the test. 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. Should I be using TestMock::Object, or something similar? I did have a look at some articles about TestMock::Object, but they made my little acolyte brain hurt. OK, no strain, no gain, but I'd like to know whether I'm on the right track first.
Thanks,
In reply to Testing with non-trivial input by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |