use of com.orm.androrm.Model in project androrm by androrm.
the class ModelTest method testSaveAutoincrementOverwrite.
public void testSaveAutoincrementOverwrite() {
Model m = new BlankModelNoAutoincrement();
// initial id has to be given
assertFalse(m.save(getContext()));
assertTrue(m.save(getContext(), 5));
assertEquals(5, m.getId());
// after id is set, regular save function works
assertTrue(m.save(getContext()));
}
Aggregations