Search in sources :

Example 1 with InvalidRealmModel

use of io.realm.entities.pojo.InvalidRealmModel in project realm-java by realm.

the class BulkInsertTests method insert_invalidRealmModel.

@Test
public void insert_invalidRealmModel() {
    InvalidRealmModel invalidRealmModel = new InvalidRealmModel();
    realm.beginTransaction();
    try {
        realm.insert(invalidRealmModel);
        fail("Expected Missing Proxy Class Exception");
    } catch (RealmException ignored) {
    } finally {
        realm.cancelTransaction();
    }
}
Also used : InvalidRealmModel(io.realm.entities.pojo.InvalidRealmModel) RealmException(io.realm.exceptions.RealmException) Test(org.junit.Test)

Aggregations

InvalidRealmModel (io.realm.entities.pojo.InvalidRealmModel)1 RealmException (io.realm.exceptions.RealmException)1 Test (org.junit.Test)1