Realm + RxSwift testing with RxBlocking
Testing RxRealm with RxBlockingRxSwift BerlinMarin Todorov
View Slide
RxRealmrealm.io
• Completely Asynchronous• Notifications will be bundled by Realm• Objects can change over timeTesting Realm
Test: collection emits when objects added[Message1]Realm.rx.add(...)ObserverObservable>[Message1]
RxTest
RxBlocking
RxBlocking!
Some NumbersRxRealm test suite with RxTest: 1570 locRxRealm test suite with RxBlocking: 921 loc
Test: observer handles error when observable errors out
Test: collection emits when objects deleted
Test: eventually changes from all threads will emit... add objects on main queue, on background queque, sync on current queue, etc...
Test: view model emits when speaker favorited
Test: model emits when resultset changes......
• EventKit - github.com/realm/EventKit• RxRealm - github.com/RxSwiftCommunity/RxRealm• RxBook - store.raywenderlich.com/products/rxswiftMarin Todorov@icanzilbUpdated!RxSwift 4