Tim Van Wassenhove home

After reading The Compare Contract last week i realized that my templates for int and string ValueObjects did not comply with the contract so i decided to add a unittest that reproduces the faulty behavior (and then corrected the implementation)

[TestMethod]
public void ShouldReturnPositiveWhenComparedWithNull()
{
	$classname$ value = new $classname$("0");
	Assert.IsTrue(value.CompareTo(null) > 0);
}

Anyway, feel free to download the corrected IntValueObject and StringValueObject templates.