Date functions in DbUnit fixtures
I needed some simple functions for writing integegration tests with DbUnit.
Functions like:
NOW()
addDays(NOW(),1)
So I downloaded the source code of DbUnit and added them. You can downdload the patch here, or the patched jar here.
Short Documentation
In every DateTime field in your dbunit fixture you can use the following functions:
addDays(baseDate, days), addHours(baseDate, hours),
addMinutes(baseDate, minutes) and addSeconds(baseDate, seconds)
Example 1:
<table […]
jazzanowak @ July 18, 2009