On Fri, 31 Oct 2003 02:22 am, Michal Maczka wrote: > It's just so nice to be in the situation when second version of the same > project and it just happen that API is very different and you have to > put to the garbage all your mock objects :)
Generally you dont write your own mock objects but use a toolkit like www.mockobjects.org. > I do believe that standalone test data is valuable outcome of any project. That is not to be doubted. It is just that it is usually not unit testing when you use it. ie when you supply test data as an external resource you are most likely testing many more variables than you realize. Are you testing parser? Are you testing resolver? Are you testing the fact that resource coesists with tests? If you construct the data as close to unit tests as possible and only test what you say you are testing then unit tests become much more valuable, easier to maintain and evolve ajnd test exactly what you want them to test. In this scenario, the only time you would ever create an xml represention in a string is when you are testing the parsing of the xml data. In every other situation you would manually construct the object tree. > For a complete software examination, both white box and black box tests > are required. black box, functional, acceptance and integration tests are all important but they are not unit tests. -- Cheers, Peter Donald --------------------------------------------------- Murphy's law - "Anything that can go wrong, will." (Actually, this is Finagle's law, which in itself shows that Finagle was right.) --------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]