use of dk.ilios.spanner.BeforeExperiment in project realm-java by realm.
the class RealmObjectReadBenchmarks method before.
@BeforeExperiment
public void before() {
Realm.init(InstrumentationRegistry.getTargetContext());
RealmConfiguration config = new RealmConfiguration.Builder().build();
Realm.deleteRealm(config);
realm = Realm.getInstance(config);
realm.executeTransaction(new Realm.Transaction() {
@Override
public void execute(Realm realm) {
readObject = realm.createObject(AllTypes.class);
readObject.setColumnString("Foo");
readObject.setColumnLong(42);
readObject.setColumnDouble(1.234D);
}
});
}
Aggregations