示例#1
0
 public void testInsertNotNullProperties() {
   NotNullThing thing = createEntity(1L);
   thing.setNotNullWrappedBoolean(null);
   thing.setNotNullWrappedInteger(null);
   try {
     dao.insert(thing);
     fail();
   } catch (NullPointerException ignored) {
   }
 }
示例#2
0
  public void testUpdateNotNullProperties() {
    NotNullThing thing = insertEntity();

    thing.setNotNullWrappedBoolean(null);
    thing.setNotNullWrappedInteger(null);
    try {
      dao.update(thing);
      fail();
    } catch (NullPointerException ignored) {
    }
  }
示例#3
0
 @Override
 protected NotNullThing createEntity(Long key) {
   NotNullThing thing = new NotNullThing();
   thing.setId(key);
   thing.setNotNullBoolean(true);
   thing.setNotNullInteger(42);
   thing.setNotNullWrappedBoolean(true);
   thing.setNotNullWrappedInteger(42);
   thing.setNullableBoolean(true);
   thing.setNullableInteger(42);
   thing.setNullableWrappedBoolean(true);
   thing.setNullableWrappedInteger(42);
   return thing;
 }