No posts for nearly a month and then 2 in a day!

Anyway: Work continues, albeit slowly, on my S:GTC-a-like which goes by the not-at-all-original working name of Galaxy.

The purpose of this post – apart from to assure those that follow this blog that I am still working on it – is about Unit Testing. Now everyone who programs in Java uses JUnit for unit testing, and it is a useful piece of software. Every open source IDE worth it’s salt has support for JUnit – even MS who seem to behind the curve on IDE development by a good couple of years has support for it in VS2K5 (in regards to C# that is).

You are reading this thinking that there is a “but” to all this and you’d be right. I have a class, which has all it’s parameters encapsulated so therefore you must use the setMethod() and the corresponding getMethod() to set and get the values. No problem there – that’s standard practice, but when it comes to testing you have to test two functions per test instead of one: You can’t test that getMethod() works without first calling setMethod() and vice versa without breaking encapsulation. Oh well, if one of the functions fails then both set and get functions will fail and shouldn’t be too hard to find out which failed.

Heading on I can see some more bumps in the road: Testing of interface classes, and testing of functions that naturally take a minute to compute before a result is available.