java.util.Date expected;
String sval;
Object actual;
sval = "2012-02-14";
value = new ElementValue[] { new ElementValueGT(null, sval) };
actual = dateTimeBinding.getValue(element, value, attrs, hints);
assertNotNull(actual);
expected = Converters.convert(sval, java.sql.Timestamp.class);
assertEquals(expected.getClass().getName() + "[" + expected + "] : "
+ actual.getClass().getName() + "[" + actual + "]", expected, actual);
sval = "2012-02-14Z";
value = new ElementValue[] { new ElementValueGT(null, sval) };
actual = dateTimeBinding.getValue(element, value, attrs, hints);
assertNotNull(actual);
expected = Converters.convert(sval, java.sql.Timestamp.class);
assertEquals(expected.getClass().getName() + "[" + expected + "] : "
+ actual.getClass().getName() + "[" + actual + "]", expected, actual);
sval = "2011-10-24T10:53:24.200Z";
value = new ElementValue[] { new ElementValueGT(null, sval) };
actual = dateTimeBinding.getValue(element, value, attrs, hints);
assertNotNull(actual);
expected = Converters.convert(sval, java.sql.Timestamp.class);
assertEquals(expected.getClass().getName() + "[" + expected + "] : "
+ actual.getClass().getName() + "[" + actual + "]", expected, actual);
sval = "2011-10-24T00:00:00.200+03:00";
value = new ElementValue[] { new ElementValueGT(null, sval) };
actual = dateTimeBinding.getValue(element, value, attrs, hints);
assertNotNull(actual);
expected = Converters.convert(sval, java.sql.Timestamp.class);
assertEquals(expected.getClass().getName() + "[" + expected + "] : "
+ actual.getClass().getName() + "[" + actual + "]", expected, actual);
sval = "10:53:24.255+03:00";
value = new ElementValue[] { new ElementValueGT(null, sval) };
try {
dateTimeBinding.getValue(element, value, attrs, hints);
} catch (SAXException e) {
assertTrue(true);
}