Search in sources :

Example 61 with AllTypes

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

the class RealmTests method runMethodOnWrongThread.

// Calling methods on a wrong thread will fail.
private boolean runMethodOnWrongThread(final Method method) throws InterruptedException, ExecutionException {
    if (method != Method.METHOD_BEGIN) {
        realm.beginTransaction();
        realm.createObject(Dog.class);
    }
    ExecutorService executorService = Executors.newSingleThreadExecutor();
    Future<Boolean> future = executorService.submit(new Callable<Boolean>() {

        @Override
        public Boolean call() throws Exception {
            try {
                switch(method) {
                    case METHOD_BEGIN:
                        realm.beginTransaction();
                        break;
                    case METHOD_COMMIT:
                        realm.commitTransaction();
                        break;
                    case METHOD_CANCEL:
                        realm.cancelTransaction();
                        break;
                    case METHOD_EXECUTE_TRANSACTION:
                        realm.executeTransaction(realm -> fail());
                        break;
                    case METHOD_EXECUTE_TRANSACTION_ASYNC:
                        realm.executeTransactionAsync(realm -> fail());
                        break;
                    case METHOD_DELETE_TYPE:
                        realm.delete(AllTypes.class);
                        break;
                    case METHOD_DELETE_ALL:
                        realm.deleteAll();
                        break;
                    case METHOD_CREATE_OBJECT:
                        realm.createObject(AllTypes.class);
                        break;
                    case METHOD_CREATE_OBJECT_WITH_PRIMARY_KEY:
                        realm.createObject(AllJavaTypes.class, 1L);
                        break;
                    case METHOD_COPY_TO_REALM:
                        realm.copyToRealm(new AllTypes());
                        break;
                    case METHOD_COPY_TO_REALM_OR_UPDATE:
                        realm.copyToRealm(new AllTypesPrimaryKey());
                        break;
                    case METHOD_CREATE_ALL_FROM_JSON:
                        realm.createAllFromJson(AllTypes.class, "[{}]");
                        break;
                    case METHOD_CREATE_OR_UPDATE_ALL_FROM_JSON:
                        realm.createOrUpdateAllFromJson(AllTypesPrimaryKey.class, "[{\"columnLong\":1," + " \"columnBoolean\": true}]");
                        break;
                    case METHOD_CREATE_FROM_JSON:
                        realm.createObjectFromJson(AllTypes.class, "{}");
                        break;
                    case METHOD_CREATE_OR_UPDATE_FROM_JSON:
                        realm.createOrUpdateObjectFromJson(AllTypesPrimaryKey.class, "{\"columnLong\":1," + " \"columnBoolean\": true}");
                        break;
                    case METHOD_INSERT_COLLECTION:
                        realm.insert(Arrays.asList(new AllTypes(), new AllTypes()));
                        break;
                    case METHOD_INSERT_OBJECT:
                        realm.insert(new AllTypes());
                        break;
                    case METHOD_INSERT_OR_UPDATE_COLLECTION:
                        realm.insert(Arrays.asList(new AllTypesPrimaryKey(), new AllTypesPrimaryKey()));
                        break;
                    case METHOD_INSERT_OR_UPDATE_OBJECT:
                        realm.insertOrUpdate(new AllTypesPrimaryKey());
                        break;
                }
                return false;
            } catch (IllegalStateException ignored) {
                return true;
            } catch (RealmException jsonFailure) {
                // TODO: Eew. Reconsider how our JSON methods reports failure. See https://github.com/realm/realm-java/issues/1594
                return (jsonFailure.getMessage().equals("Could not map Json"));
            }
        }
    });
    boolean result = future.get();
    if (method != Method.METHOD_BEGIN) {
        realm.cancelTransaction();
    }
    return result;
}
Also used : PrimaryKeyAsBoxedInteger(io.realm.entities.PrimaryKeyAsBoxedInteger) Arrays(java.util.Arrays) NullPrimaryKey(io.realm.objectid.NullPrimaryKey) DefaultValueSetter(io.realm.entities.DefaultValueSetter) Assert.assertNotSame(org.junit.Assert.assertNotSame) Dog(io.realm.entities.Dog) BigDecimal(java.math.BigDecimal) JSONException(org.json.JSONException) Future(java.util.concurrent.Future) DefaultValueFromOtherConstructor(io.realm.entities.DefaultValueFromOtherConstructor) StringOnly(io.realm.entities.StringOnly) Looper(android.os.Looper) NoPrimaryKeyNullTypes(io.realm.entities.NoPrimaryKeyNullTypes) DefaultValueOfField(io.realm.entities.DefaultValueOfField) NonLatinFieldNames(io.realm.entities.NonLatinFieldNames) PrimaryKeyAsBoxedByte(io.realm.entities.PrimaryKeyAsBoxedByte) InstrumentationRegistry(androidx.test.platform.app.InstrumentationRegistry) Executors(java.util.concurrent.Executors) InvocationTargetException(java.lang.reflect.InvocationTargetException) CountDownLatch(java.util.concurrent.CountDownLatch) Assert.assertFalse(org.junit.Assert.assertFalse) Mockito.mock(org.mockito.Mockito.mock) FilenameFilter(java.io.FilenameFilter) RealmFileException(io.realm.exceptions.RealmFileException) RunWith(org.junit.runner.RunWith) SystemClock(android.os.SystemClock) Callable(java.util.concurrent.Callable) PrimaryKeyAsBoxedShort(io.realm.entities.PrimaryKeyAsBoxedShort) ArrayList(java.util.ArrayList) Assert.assertSame(org.junit.Assert.assertSame) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) Decimal128(org.bson.types.Decimal128) Before(org.junit.Before) TestHelper.testOneObjectFound(io.realm.TestHelper.testOneObjectFound) RealmMigrationNeededException(io.realm.exceptions.RealmMigrationNeededException) PrimaryKeyAsLong(io.realm.entities.PrimaryKeyAsLong) RealmLog(io.realm.log.RealmLog) Assert.assertTrue(org.junit.Assert.assertTrue) AssertionFailedError(junit.framework.AssertionFailedError) Test(org.junit.Test) IOException(java.io.IOException) RealmThread(io.realm.util.RealmThread) DefaultValueConstructor(io.realm.entities.DefaultValueConstructor) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) AtomicLong(java.util.concurrent.atomic.AtomicLong) OsSharedRealm(io.realm.internal.OsSharedRealm) Assert.assertNull(org.junit.Assert.assertNull) TestHelper.testNoObjectFound(io.realm.TestHelper.testNoObjectFound) Owner(io.realm.entities.Owner) PrimaryKeyRequiredAsBoxedByte(io.realm.entities.PrimaryKeyRequiredAsBoxedByte) UiThreadTest(androidx.test.annotation.UiThreadTest) ObjectId(org.bson.types.ObjectId) CyclicTypePrimaryKey(io.realm.entities.CyclicTypePrimaryKey) Assert.assertEquals(org.junit.Assert.assertEquals) AllTypesPrimaryKey(io.realm.entities.AllTypesPrimaryKey) CoreMatchers(org.hamcrest.CoreMatchers) UiThreadTestRule(androidx.test.rule.UiThreadTestRule) AllJavaTypes(io.realm.entities.AllJavaTypes) Date(java.util.Date) DefaultValueOverwriteNullLink(io.realm.entities.DefaultValueOverwriteNullLink) Scanner(java.util.Scanner) Random(java.util.Random) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) ExtraTests.assertArrayEquals(io.realm.internal.test.ExtraTests.assertArrayEquals) Assert.assertThat(org.junit.Assert.assertThat) JSONObject(org.json.JSONObject) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) After(org.junit.After) Assert.fail(org.junit.Assert.fail) Pair(io.realm.internal.util.Pair) StringOnlyReadOnly(io.realm.entities.StringOnlyReadOnly) OwnerPrimaryKey(io.realm.entities.OwnerPrimaryKey) UUID(java.util.UUID) RealmPrimaryKeyConstraintException(io.realm.exceptions.RealmPrimaryKeyConstraintException) PrimaryKeyAsBoxedLong(io.realm.entities.PrimaryKeyAsBoxedLong) Objects(java.util.Objects) List(java.util.List) PrimaryKeyRequiredAsString(io.realm.entities.PrimaryKeyRequiredAsString) BlockingLooperThread(io.realm.rule.BlockingLooperThread) StringAndInt(io.realm.entities.StringAndInt) Context(android.content.Context) RandomPrimaryKey(io.realm.entities.RandomPrimaryKey) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) RealmException(io.realm.exceptions.RealmException) AtomicReference(java.util.concurrent.atomic.AtomicReference) PrimaryKeyRequiredAsBoxedShort(io.realm.entities.PrimaryKeyRequiredAsBoxedShort) Assume(org.junit.Assume) Build(android.os.Build) ExpectedException(org.junit.rules.ExpectedException) ExecutorService(java.util.concurrent.ExecutorService) PrimaryKeyRequiredAsBoxedLong(io.realm.entities.PrimaryKeyRequiredAsBoxedLong) PrimaryKeyRequiredAsBoxedInteger(io.realm.entities.PrimaryKeyRequiredAsBoxedInteger) Assert.assertNotNull(org.junit.Assert.assertNotNull) AllTypes(io.realm.entities.AllTypes) Mockito.when(org.mockito.Mockito.when) CyclicType(io.realm.entities.CyclicType) Object4957(io.realm.entities.Object4957) Cat(io.realm.entities.Cat) TimeUnit(java.util.concurrent.TimeUnit) PrimaryKeyAsString(io.realm.entities.PrimaryKeyAsString) PrimaryKeyMix(io.realm.entities.PrimaryKeyMix) Rule(org.junit.Rule) Ignore(org.junit.Ignore) StrictMode(android.os.StrictMode) DogPrimaryKey(io.realm.entities.DogPrimaryKey) JSONArray(org.json.JSONArray) TemporaryFolder(org.junit.rules.TemporaryFolder) InputStream(java.io.InputStream) AllTypes(io.realm.entities.AllTypes) JSONException(org.json.JSONException) InvocationTargetException(java.lang.reflect.InvocationTargetException) RealmFileException(io.realm.exceptions.RealmFileException) RealmMigrationNeededException(io.realm.exceptions.RealmMigrationNeededException) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) RealmPrimaryKeyConstraintException(io.realm.exceptions.RealmPrimaryKeyConstraintException) RealmException(io.realm.exceptions.RealmException) ExpectedException(org.junit.rules.ExpectedException) RealmException(io.realm.exceptions.RealmException) ExecutorService(java.util.concurrent.ExecutorService) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AllJavaTypes(io.realm.entities.AllJavaTypes) AllTypesPrimaryKey(io.realm.entities.AllTypesPrimaryKey)

Example 62 with AllTypes

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

the class RealmTests method copyToRealm.

@Test
public void copyToRealm() {
    Date date = new Date();
    Dog dog = new Dog();
    dog.setName("Fido");
    RealmList<Dog> list = new RealmList<Dog>();
    list.add(dog);
    AllTypes allTypes = new AllTypes();
    allTypes.setColumnString("String");
    allTypes.setColumnLong(1L);
    allTypes.setColumnFloat(1F);
    allTypes.setColumnDouble(1D);
    allTypes.setColumnBoolean(true);
    allTypes.setColumnDate(date);
    allTypes.setColumnBinary(new byte[] { 1, 2, 3 });
    allTypes.setColumnDecimal128(new Decimal128(new BigDecimal("12345")));
    allTypes.setColumnObjectId(new ObjectId(TestHelper.generateObjectIdHexString(7)));
    allTypes.setColumnUUID(UUID.fromString(TestHelper.generateUUIDString(7)));
    allTypes.setColumnRealmAny(RealmAny.valueOf(UUID.fromString(TestHelper.generateUUIDString(6))));
    allTypes.setColumnRealmObject(dog);
    allTypes.setColumnRealmList(list);
    allTypes.setColumnStringList(new RealmList<String>("1"));
    allTypes.setColumnBinaryList(new RealmList<byte[]>(new byte[] { 1 }));
    allTypes.setColumnBooleanList(new RealmList<Boolean>(true));
    allTypes.setColumnLongList(new RealmList<Long>(1L));
    allTypes.setColumnDoubleList(new RealmList<Double>(1D));
    allTypes.setColumnFloatList(new RealmList<Float>(1F));
    allTypes.setColumnDateList(new RealmList<Date>(new Date(1L)));
    allTypes.setColumnDecimal128List(new RealmList<Decimal128>(new Decimal128(new BigDecimal("54321"))));
    allTypes.setColumnObjectIdList(new RealmList<ObjectId>(new ObjectId(TestHelper.generateObjectIdHexString(5))));
    allTypes.setColumnUUIDList(new RealmList<>(UUID.fromString(TestHelper.generateUUIDString(5))));
    allTypes.setColumnRealmAnyList(new RealmList<>(RealmAny.valueOf(UUID.fromString(TestHelper.generateUUIDString(7)))));
    realm.beginTransaction();
    AllTypes realmTypes = realm.copyToRealm(allTypes);
    realm.commitTransaction();
    // Objects should not be considered equal.
    assertNotSame(allTypes, realmTypes);
    // But they contain the same data.
    assertEquals(allTypes.getColumnString(), realmTypes.getColumnString());
    assertEquals(allTypes.getColumnLong(), realmTypes.getColumnLong());
    assertEquals(allTypes.getColumnFloat(), realmTypes.getColumnFloat(), 0);
    assertEquals(allTypes.getColumnDouble(), realmTypes.getColumnDouble(), 0);
    assertEquals(allTypes.isColumnBoolean(), realmTypes.isColumnBoolean());
    assertEquals(allTypes.getColumnDate(), realmTypes.getColumnDate());
    assertArrayEquals(allTypes.getColumnBinary(), realmTypes.getColumnBinary());
    assertEquals(allTypes.getColumnDecimal128(), realmTypes.getColumnDecimal128());
    assertEquals(allTypes.getColumnObjectId(), realmTypes.getColumnObjectId());
    assertEquals(allTypes.getColumnUUID(), realmTypes.getColumnUUID());
    assertEquals(allTypes.getColumnRealmAny(), realmTypes.getColumnRealmAny());
    assertEquals(allTypes.getColumnRealmObject().getName(), dog.getName());
    assertEquals(list.size(), realmTypes.getColumnRealmList().size());
    // noinspection ConstantConditions
    assertEquals(list.get(0).getName(), realmTypes.getColumnRealmList().get(0).getName());
    assertEquals(1, realmTypes.getColumnStringList().size());
    assertEquals("1", realmTypes.getColumnStringList().get(0));
    assertEquals(1, realmTypes.getColumnBooleanList().size());
    assertEquals(true, realmTypes.getColumnBooleanList().get(0));
    assertEquals(1, realmTypes.getColumnBinaryList().size());
    assertArrayEquals(new byte[] { 1 }, realmTypes.getColumnBinaryList().get(0));
    assertEquals(1, realmTypes.getColumnLongList().size());
    assertEquals((Long) 1L, realmTypes.getColumnLongList().get(0));
    assertEquals(1, realmTypes.getColumnDoubleList().size());
    assertEquals((Double) 1D, realmTypes.getColumnDoubleList().get(0));
    assertEquals(1, realmTypes.getColumnFloatList().size());
    assertEquals((Float) 1F, realmTypes.getColumnFloatList().get(0));
    assertEquals(1, realmTypes.getColumnDateList().size());
    assertEquals(new Date(1), realmTypes.getColumnDateList().get(0));
    assertEquals(1, realmTypes.getColumnDecimal128List().size());
    assertEquals(new Decimal128(new BigDecimal("54321")), realmTypes.getColumnDecimal128List().get(0));
    assertEquals(1, realmTypes.getColumnObjectIdList().size());
    assertEquals(new ObjectId(TestHelper.generateObjectIdHexString(5)), realmTypes.getColumnObjectIdList().get(0));
    assertEquals(1, realmTypes.getColumnUUIDList().size());
    assertEquals(UUID.fromString(TestHelper.generateUUIDString(5)), realmTypes.getColumnUUIDList().get(0));
    assertEquals(1, realmTypes.getColumnRealmAnyList().size());
    assertEquals(RealmAny.valueOf(UUID.fromString(TestHelper.generateUUIDString(7))), realmTypes.getColumnRealmAnyList().get(0));
}
Also used : ObjectId(org.bson.types.ObjectId) AllTypes(io.realm.entities.AllTypes) Decimal128(org.bson.types.Decimal128) PrimaryKeyRequiredAsString(io.realm.entities.PrimaryKeyRequiredAsString) PrimaryKeyAsString(io.realm.entities.PrimaryKeyAsString) Date(java.util.Date) BigDecimal(java.math.BigDecimal) PrimaryKeyAsLong(io.realm.entities.PrimaryKeyAsLong) AtomicLong(java.util.concurrent.atomic.AtomicLong) PrimaryKeyAsBoxedLong(io.realm.entities.PrimaryKeyAsBoxedLong) PrimaryKeyRequiredAsBoxedLong(io.realm.entities.PrimaryKeyRequiredAsBoxedLong) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Dog(io.realm.entities.Dog) Test(org.junit.Test) UiThreadTest(androidx.test.annotation.UiThreadTest)

Example 63 with AllTypes

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

the class RealmTests method utf8Tests.

@Test
public void utf8Tests() {
    realm.beginTransaction();
    realm.delete(AllTypes.class);
    realm.commitTransaction();
    String file = "assets/unicode_codepoints.csv";
    Scanner scanner = new Scanner(getClass().getClassLoader().getResourceAsStream(file), "UTF-8");
    int i = 0;
    String currentUnicode = null;
    try {
        realm.beginTransaction();
        while (scanner.hasNextLine()) {
            currentUnicode = scanner.nextLine();
            char[] chars = Character.toChars(Integer.parseInt(currentUnicode, 16));
            String codePoint = new String(chars);
            AllTypes o = realm.createObject(AllTypes.class);
            o.setColumnLong(i);
            o.setColumnString(codePoint);
            if (i > 1) {
                assertEquals("Codepoint: " + i + " / " + currentUnicode, codePoint, // codepoint 0 is NULL, ignore for now.
                o.getColumnString());
            }
            i++;
        }
        realm.commitTransaction();
    } catch (Exception e) {
        fail("Failure, Codepoint: " + i + " / " + currentUnicode + " " + e.getMessage());
    }
}
Also used : Scanner(java.util.Scanner) AllTypes(io.realm.entities.AllTypes) PrimaryKeyRequiredAsString(io.realm.entities.PrimaryKeyRequiredAsString) PrimaryKeyAsString(io.realm.entities.PrimaryKeyAsString) JSONException(org.json.JSONException) InvocationTargetException(java.lang.reflect.InvocationTargetException) RealmFileException(io.realm.exceptions.RealmFileException) RealmMigrationNeededException(io.realm.exceptions.RealmMigrationNeededException) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) RealmPrimaryKeyConstraintException(io.realm.exceptions.RealmPrimaryKeyConstraintException) RealmException(io.realm.exceptions.RealmException) ExpectedException(org.junit.rules.ExpectedException) Test(org.junit.Test) UiThreadTest(androidx.test.annotation.UiThreadTest)

Example 64 with AllTypes

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

the class RxJavaTests method realmList_parentDeletionCompleteFlowable.

@Test
@RunTestInLooperThread
public void realmList_parentDeletionCompleteFlowable() {
    realm.beginTransaction();
    final AllTypes parent = realm.createObject(AllTypes.class);
    final RealmList<Dog> list = parent.getColumnRealmList();
    list.add(new Dog("Fido"));
    realm.commitTransaction();
    looperThread.keepStrongReference(parent);
    // We should only emit valid lists. If the parent of the list is invalidated
    // it should close the stream gracefully resulting in onComplete being called.
    subscription = list.asFlowable().subscribe(change -> {
        assertTrue(change.isValid());
    }, error -> {
        fail(error.toString());
    }, () -> {
        // Deleting the parent will gracefully close the stream
        disposeSuccessfulTest(realm);
    });
    looperThread.postRunnable(() -> {
        realm.beginTransaction();
        parent.deleteFromRealm();
        realm.commitTransaction();
    });
}
Also used : AllJavaTypes(io.realm.entities.AllJavaTypes) RunWith(org.junit.runner.RunWith) Dog(io.realm.entities.Dog) SystemClock(android.os.SystemClock) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) Flowable(io.reactivex.Flowable) RunInLooperThread(io.realm.rule.RunInLooperThread) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Schedulers(io.reactivex.schedulers.Schedulers) Pair(io.realm.internal.util.Pair) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) RunTestInLooperThread(io.realm.rule.RunTestInLooperThread) RealmLog(io.realm.log.RealmLog) Assert.assertNotNull(org.junit.Assert.assertNotNull) AllTypes(io.realm.entities.AllTypes) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Consumer(io.reactivex.functions.Consumer) CyclicType(io.realm.entities.CyclicType) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) AtomicLong(java.util.concurrent.atomic.AtomicLong) Disposable(io.reactivex.disposables.Disposable) Rule(org.junit.Rule) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) Assert.assertEquals(org.junit.Assert.assertEquals) AllTypes(io.realm.entities.AllTypes) Dog(io.realm.entities.Dog) RunTestInLooperThread(io.realm.rule.RunTestInLooperThread) Test(org.junit.Test)

Example 65 with AllTypes

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

the class RxJavaTests method wrongGenericClassThrows.

@Test
@RunTestInLooperThread
public void wrongGenericClassThrows() {
    realm.beginTransaction();
    final AllTypes obj = realm.createObject(AllTypes.class);
    realm.commitTransaction();
    Flowable<CyclicType> obs = obj.asFlowable();
    subscription = obs.subscribe(cyclicType -> fail(), ignoredError -> {
        disposeSuccessfulTest(realm);
    });
}
Also used : AllJavaTypes(io.realm.entities.AllJavaTypes) RunWith(org.junit.runner.RunWith) Dog(io.realm.entities.Dog) SystemClock(android.os.SystemClock) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) Flowable(io.reactivex.Flowable) RunInLooperThread(io.realm.rule.RunInLooperThread) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Schedulers(io.reactivex.schedulers.Schedulers) Pair(io.realm.internal.util.Pair) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) RunTestInLooperThread(io.realm.rule.RunTestInLooperThread) RealmLog(io.realm.log.RealmLog) Assert.assertNotNull(org.junit.Assert.assertNotNull) AllTypes(io.realm.entities.AllTypes) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Consumer(io.reactivex.functions.Consumer) CyclicType(io.realm.entities.CyclicType) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) AtomicLong(java.util.concurrent.atomic.AtomicLong) Disposable(io.reactivex.disposables.Disposable) Rule(org.junit.Rule) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) Assert.assertEquals(org.junit.Assert.assertEquals) AllTypes(io.realm.entities.AllTypes) CyclicType(io.realm.entities.CyclicType) RunTestInLooperThread(io.realm.rule.RunTestInLooperThread) Test(org.junit.Test)

Aggregations

AllTypes (io.realm.entities.AllTypes)225 Test (org.junit.Test)210 RunTestInLooperThread (io.realm.rule.RunTestInLooperThread)70 UiThreadTest (androidx.test.annotation.UiThreadTest)54 Date (java.util.Date)36 DictionaryAllTypes (io.realm.entities.DictionaryAllTypes)32 Dog (io.realm.entities.Dog)27 JSONObject (org.json.JSONObject)26 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)22 RunInLooperThread (io.realm.rule.RunInLooperThread)20 InputStream (java.io.InputStream)19 Decimal128 (org.bson.types.Decimal128)19 ByteArrayInputStream (java.io.ByteArrayInputStream)17 ObjectId (org.bson.types.ObjectId)15 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)11 UiThreadTest (android.support.test.annotation.UiThreadTest)10 AtomicLong (java.util.concurrent.atomic.AtomicLong)10 OsSharedRealm (io.realm.internal.OsSharedRealm)9 BigDecimal (java.math.BigDecimal)9 NonLatinFieldNames (io.realm.entities.NonLatinFieldNames)8