Search in sources :

Example 1 with DefaultValueOverwriteNullLink

use of io.realm.entities.DefaultValueOverwriteNullLink in project realm-java by realm.

the class RealmTests method createObject_overwriteNullifiedLinkWithDefaultValue.

@Test
public void createObject_overwriteNullifiedLinkWithDefaultValue() {
    final DefaultValueOverwriteNullLink created;
    realm.beginTransaction();
    created = realm.createObject(DefaultValueOverwriteNullLink.class);
    realm.commitTransaction();
    assertEquals(created.getExpectedKeyOfFieldObject(), created.getFieldObject().getFieldRandomPrimaryKey());
}
Also used : DefaultValueOverwriteNullLink(io.realm.entities.DefaultValueOverwriteNullLink) Test(org.junit.Test) UiThreadTest(androidx.test.annotation.UiThreadTest)

Aggregations

UiThreadTest (androidx.test.annotation.UiThreadTest)1 DefaultValueOverwriteNullLink (io.realm.entities.DefaultValueOverwriteNullLink)1 Test (org.junit.Test)1