Jason Nadal

Restless C#ding

January 2008 - Posts

JNFileCombiner V1.0 Freeware

As I had written here, I am working on a freeware program called JNFileCombiner to combine parts of files numbered .001 through .nnn. I had seen other programs do this, as well as batch files (just by copying the files together), but I figured this was a very simple project to get started with fully unit-testing code.

Peter Waldschmidt of Gnoso was kind enough to support this open-source project by giving a license to NCover free of charge, and already I have seen benefits to improving my unit tests. I've found that exception scenarios were not covered by my tests.

Last night, I posted the first version of the application, with source, to a new codeplex project here. It's a bit rough around the edges, but it works. I really need to work on complete comment coverage, simplification of the unit tests, and some refactoring, but I'm working that into the plan for V1.1.

FileCombiner Freeware

I've decided to delve more into fully unit-tested code and write an application from scratch using TDD methodologies after being re-invigorated by Robert C. Martin's fantastic Craftsman article series ( http://www.objectmentor.com/resources/publishedArticles.html -- click on the "Test Driven Development" category).

 I'm using NUnit ( http://www.nunit.org/index.php ) to do unit tests, with TestDriven.NET ( http://www.testdriven.net/quickstart.aspx ) used along with an obsolete version of NCover ( http://www.ncover.com ).

 I have no complaints with NUnit, but TestDriven.NET has some strangeness in studio 2008 that I will detail shortly, once I make sure the issues that I am facing are not simply due to PEBKAC on my part. NCover seems quite nice to be able to have a way to see NUnit coverage, without resorting to the MS tools (which do not seem to play nicely with external testing frameworks like NUnit).

 Next steps:

  • Try new version of NCover and review it (the version I have now does not seem to respect the setup and teardown attributes before running tests)
  • Complete first release of FileCombiner (I'd estimate the initial features are at about 85%, with ~85% code coverage according to NCover)
  • Publish release, with unit tests.
  • Beautify the UI; use WPF, include progress bar and diminish use of textbox as a vehicle for reporting progress
More Posts