Earlier this week Peter Bell asked if anyone was doing anything in the way of auto generating unit tests. Well, I've been using Brian Rinaldi's cfcGenerator for a project at work and early on I realized that having some unit tests for all the components I was creating with the tool would probably be a good thing. If you haven't seen Brian's tool it is very cool. Out of the box it generates Bean, DAO, Gateway and Service objects for a database table as well as a ColdSpring snippet which you can use in your bean definition XML file. The really great thing about this tool is that it is very easy to extend and customize. So knowing I really should be building unit tests and seeing how easy it was to work with the cfcGenerator I decided to download cfcUnit spent a couple of hours hacking together a way to generate some unit tests using the cfcGenerator.
Last week I posted about some Java alternatives to CFDIRECTORY and ConvertDate. I posted a snippet of code which attempted to show how to get the DateLastModified information for files using Java API calls. One of my readers pointed out that the code I posted may not return the correct time given that I was applying the current DST offset to the lastModified value and not the DST offset in effect when the file was written.
I quickly updated my post to attempt to use the DST offset in effect when the file was modified. However after testing I found that this snippet was not returning the correct lastModified time.
On Tuesday I was having a discussion with a coworker and somehow it came up that he was having issues using cfdirectory on a rather large directory of log files. I pointed him to Mark Kruger's Java Based Directory List blog post which I had just read last week. He took a look and sent back the following snippet:
This blog is now running BlogCFC 5.5. I upgraded for two reasons. First, I'm working on a redesign of this blog so I figured I might as well be working with the latest and greatest. Second, I wanted to set up a another site so that my wife and I can share our experiences with our new baby girl. I was going to build a small site for this, but the new image features in this release of BlogCFC saved me the effort. (Time seems to be at a premium with a new baby in the house:) Thanks to Ray and everyone else who worked on this release!