@Override
 public void populateTestEntity(Entity entity) throws Exception {
   entity.set("col1", sdf.parse("2012-03-13 23:59:33"));
   entity.set("col2", sdf.parse("2013-02-09 13:12:11"));
   assertEquals(entity.getUtilDate("col1"), sdf.parse("2012-03-13 23:59:33"));
   assertEquals(entity.getUtilDate("col2"), sdf.parse("2013-02-09 13:12:11"));
 }
Exemplo n.º 2
0
 @Override
 public java.util.Date getUtilDate(String attributeName) {
   if (fetch.hasField(attributeName)) {
     return decoratedEntity.getUtilDate(attributeName);
   } else {
     return entityManager
         .getReference(getEntityMetaData(), getIdValue())
         .getUtilDate(attributeName);
   }
 }
 @Override
 public void verifyTestEntityAfterUpdate(Entity entity) throws Exception {
   assertEquals(entity.getUtilDate("col1"), sdf.parse("2012-03-13 23:59:33"));
   assertEquals(entity.getUtilDate("col2"), sdf.parse("2013-02-09 13:00:00"));
 }
 @Override
 public void verifyTestEntityAfterInsert(Entity entity) throws Exception {
   assertEquals(entity.getUtilDate("col1"), sdf.parse("2012-03-13 23:59:33"));
   assertEquals(entity.getUtilDate("col2"), sdf.parse("2013-02-09 13:12:11"));
   // assertEquals(entity.getUtilDate("col3"), sdf.parse("2010-09-29 18:46:19")); (see issue #4554)
 }