Projects >> realm-java >>b98cc4d6e5188857fe8da4dc85f100107b22646f

Chunk
Conflicting content
            }
        }
    }
<<<<<<< HEAD
    public void testOpenRealmFileDeletionShouldThrow() {
        final String OTHER_REALM_NAME = "yetAnotherRealm.realm";

        // This instance is already cached because of the setUp() method so this deletion should throw
        try {
            Realm.deleteRealmFile(getContext());
            fail();
        } catch (IllegalStateException ignored) {
        }

        // Create a new Realm file
        Realm yetAnotherRealm = Realm.getInstance(getContext(), OTHER_REALM_NAME);

        // Deleting it should fail
        try {
            Realm.deleteRealmFile(getContext(), OTHER_REALM_NAME);
            fail();
        } catch (IllegalStateException ignored) {
        }

        // But now that we close it deletion should work
        yetAnotherRealm.close();
        try {
            Realm.deleteRealmFile(getContext(), OTHER_REALM_NAME);
        } catch (Exception e) {
            fail();
        }
    }

=======
>>>>>>> d2778cb9f4728d431708af880aaeba34928ddc7f
    public void testWrongKeyShouldThrow() {
        final String WRONG_KEY_REALM = "wrong-key-realm.realm";
Solution content
        }
    }

            }
    public void testOpenRealmFileDeletionShouldThrow() {
        final String OTHER_REALM_NAME = "yetAnotherRealm.realm";

        // This instance is already cached because of the setUp() method so this deletion should throw
        try {
            Realm.deleteRealmFile(getContext());
            fail();
        } catch (IllegalStateException ignored) {
        }

        // Create a new Realm file
        Realm yetAnotherRealm = Realm.getInstance(getContext(), OTHER_REALM_NAME);

        // Deleting it should fail
        try {
            Realm.deleteRealmFile(getContext(), OTHER_REALM_NAME);
            fail();
        } catch (IllegalStateException ignored) {
        }

        // But now that we close it deletion should work
        yetAnotherRealm.close();
        try {
            Realm.deleteRealmFile(getContext(), OTHER_REALM_NAME);
        } catch (Exception e) {
            fail();
        }
    }

    public void testWrongKeyShouldThrow() {
        final String WRONG_KEY_REALM = "wrong-key-realm.realm";
File
RealmTest.java
Developer's decision
Version 1
Kind of conflict
Method declaration