use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class TransactionTest method setUp.
@Override
public void setUp() {
List<Class<? extends Model>> models = new ArrayList<Class<? extends Model>>();
models.add(BlankModel.class);
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.setModels(models);
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class TransactionTest method testCommit.
public void testCommit() {
assertEquals(0, BlankModel.objects(getContext()).count());
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.beginTransaction();
BlankModel b1 = new BlankModel();
b1.save(getContext());
BlankModel b2 = new BlankModel();
b2.save(getContext());
adapter.commitTransaction();
assertEquals(2, BlankModel.objects(getContext()).count());
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class ForeignKeyFieldTest method tearDown.
@Override
public void tearDown() {
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.drop();
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class LocationFieldTest method tearDown.
@Override
public void tearDown() {
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.drop();
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class ManyToManyFieldTest method tearDown.
@Override
public void tearDown() {
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.drop();
}
Aggregations