By Peter Bell

Unit Tests for Fizzbuzz?!

For anyone who has been following the FizzBuzz - saga, someone has now written a full Java implementation complete with Unit tests.

Not that there is anything wrong with Java and especially with Unit Testing, but this commentary (title NSFW) pretty well sums up my thoughts and also makes some great points about what writing good software is all about.

Comments
I thought the idea of unit testing fizzbuzz was kind of funny... though, I'm not sure how I'd go about doing that (seems like a 5 line program to me) ... guess I'll have to read it to find out, but I'm not that curious. =)
# Posted By Sam | 3/13/07 12:13 PM
Well, if you created an nice FizzBuzz component with a display method, I'm thinking:

display(FizzCount int, BuzzCount int, TotalCount int): string

Then I *guess* you could run asserts against the output string - although I think there would be more chance of errors in your tests than in your code.
# Posted By Peter Bell | 3/13/07 12:41 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.