[Mono-list] System.XML and Unit Tests

Jason Diamond jason@injektilo.org
Mon, 25 Feb 2002 17:20:56 -0800


Hi.

If there's no objections, I'm going to start working on XmlNode,
XmlDocument, XmlLinkedNode, and XmlElement. I want to start exercising my
XmlTextReader so that it can actually load documents that we can play with
in a DOM.

There's a lot of existing code for these classes but not a single test. So I
wasn't too surprised to find them was riddled with bugs. I'm going to start
adding tests and then refactoring as needed.

I'm really stoked that Mono has tests as part of its build process but that
doesn't do any good if we aren't writing them. If you need some inspriration
on why you should be writing your unit tests BEFORE writing your code,
please read this:

http://nunit.sourceforge.net/doc/testinfected/testing.html

Sorry if I'm sounding too preachy. It's just that once you start writing
tests it's impossible to trust code that doesn't have them.

Thanks,
Jason