Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Releases: juanmendez/realm-tester

Updated gradle, and fixed a bug with realmObject.isValid()

06 Jul 05:31
Compare
Choose a tag to compare
updated RealmObject as valid when created or updated, and false when …

…deleted.

RealmAnnotations + realmQuery.copyToRealmOrUpdate

09 Apr 18:58
Compare
Choose a tag to compare

This is a new class created to keep a hold of annotations from your realmModel|realmObject classes. I came with this solution as I cannot use reflection and figure out annotations of retention class types. How this is implemented can be found on the demo application.

Because now I can track @PrimaryKey, then I can go ahead and also update realmModels. This test can be found in the demo in class QueryTests.java, at method shouldUpdate()

not()

01 Apr 05:25
Compare
Choose a tag to compare
not() Pre-release
Pre-release

One of the greatest challenges I had was to apply not() within a group. This feature has been added, tested, and completed. Besides not(), other methods such as notEqualTo(), isNotNull(), isNotEmpty(), are behind the curtains using not() as not().isEqualTo().

realmQuery.distinct(), realmQuery.sort(), realmResults.sort()

29 Mar 23:42
Compare
Choose a tag to compare

user can now sort, and also us distinct. realmResults.distinct( field1, field2), or realmResults.distinct(field1).distinct(field2), do the same thing, as the result is finding realmModels which are unique having field1, and field2. This is what makes sense, but I also noticed Realm might behave a bit differently.

realmResults.sort(field1, field2), it is sorted in reverse order. First field2, and then field1. That's how it's done by Realm during testing I could confirm that is what happened.

realmResults.distinct("age",....)

24 Mar 00:12
Compare
Choose a tag to compare
Pre-release

Now we can find distinct values in realmResults. I noticed that having several distinct fields in Realm only returns the distinct values of the first field. So I am mocking what Realm is currently doing. This release can revert this effect when Realm goes the same route.

I am including console logs with prefix #mockingrealm, and make the developer aware of anything during test which does not comply with Realm.

Here is a demo:

#mocking-realm: ensure 'Dog.name' has @index annotation
#mocking-realm: ensure 'Dog.birthdate' has @index annotation

By the way due to the @Index annotation not being retained at runtime , I cannot use reflection to check for class members having such annotation. So I am letting the developer aware at the console.

Realm 3.0.0 has this method already marked as deprecated. So this is going to stay here as I support this older version. I found it beneficial to first cover realmResults before moving into realmQuery.distinct(Async).

RealmConfigurations

22 Mar 19:53
Compare
Choose a tag to compare
RealmConfigurations Pre-release
Pre-release

They only have to be placed in a dependency away from any Android component; otherwise, during testing they should be skipped.

Update *async methods, addChangeListeners, and asObservables

20 Mar 18:44
Compare
Choose a tag to compare

At this point changeListeners are working as expected.
findAllAsync, findFirstAsync are working and also changeListeners can be attached

What is needed now is to test more in regards to unsubscribing changeListeners, and rxObservables.

first phase of realmQuery.*Async() methods, and realmQuery.asObservable()

17 Mar 01:21
Compare
Choose a tag to compare

realmQuery.findAllAsync(), realmQuery.findFirstAsync(), realmQuery.asObservable()

Starting with *Async methods

15 Mar 03:19
Compare
Choose a tag to compare
Pre-release
v0.03

fixes

robolectric:3.3.1

10 Mar 17:44
Compare
Choose a tag to compare
robolectric:3.3.1 Pre-release
Pre-release

The current pre-release uses the latest version up to date of Robolectric.