public void ObjectTests(RealmObjectBase value, bool isManaged) { RealmValue rv = value; if (isManaged) { var retrievedObject = PersistAndFind(rv); rv = retrievedObject.RealmValueProperty; } Assert.That(rv.Type, Is.EqualTo(RealmValueType.Object)); Assert.That((RealmObjectBase)rv, Is.EqualTo(value)); Assert.That(rv.As <RealmObjectBase>(), Is.EqualTo(value)); Assert.That(rv.AsRealmObject(), Is.EqualTo(value)); Assert.That(rv != RealmValue.Null); }