Nelz's Blog

29 October 2007

Announcing JECTU – the Java Equals Contract Test Utility

Filed under: JECTU — nelz9999 @ 10:09

For the last couple of months, I’ve been writing tests for a bunch of domain objects. One of the big things when dealing with domain objects is dealing with identity. The equals(Object obj) and hashCode() methods are the two major levers a Java programmer has when dealing with identity.

There is a lot of overhead when testing equality in Java. There is an explicit set of characteristics (reflexive, transitive, consistent, symmetric) that a well-written equals method must adhere to, and I got tired of writing similar code, over and over again to test this code.

So, as I have heard many a time, as soon as I got tired of doing something over an over again, I wrote a utility to help me.

I have gotten to a decent starting point and wanted to open source my efforts. So, I now present to you: JECTU – the Java Equals Contract Test Utility.

Yes, I have quite a ways to go before it is a first-class test utility, but it is now in a usable state, so I thought I’d share it out now. In the future, I may find a home for it on SourceForge or on Google Code, but for now, I’m just going to host it here.

I am also still trying to figure out the Maven site publishing, and how to add extra pages to the static site output, so the download link is not mentioned in the Maven output. Here are the corresponding links:

Let me know if you have any questions or suggestions!


Update 20071112: I have changed the directory structure around a bit, and I updated the links here to reflect the new structure.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.