Git Product home page Git Product logo

realm-tester's Introduction

realm-tester

-- status: tuning prior to making it work with latest Realm

This is ongoing work to unit test Realm as much as possible hammering with Mockito, and PowerMockito.

Gradle:

repositories {
...
    maven { url 'https://jitpack.io' }
}

dependencies {
...
    testImplementation 'com.github.juanmendez:realm-tester:master-SNAPSHOT'
}

Wiki has a basic instructions how to import and use this library

What has been done so far

  • Working with Realm 3.0.0
  • Supporting Robolectric 3.3.1
  • Works with Mockito 1.10.19
  • Works with PowerMockito 1.6.4
  • Have Realm.getDefaultInstance()
  • To track realm annotations, register with MockRealm your tested class annotations based on RealmAnnotations, see demo.
  • If desired, do realm configurations in a dependency class rather than an Android component see wiki.
  • Querying works for around 70% of all methods, more to come in the next phase.
  • Chaining queries
  • Asynchronous and synchronous transactions with RxJava
    • Schedulers for testing use Schedulers.immediate()
  • Support or() for chaining queries
  • Support not()
  • realmQuery.distinct(*), realmResults.distinct() has been deprecated in Realm 3.0.0
  • realmQuery.sort(), realmResults.sort()
  • Grouping
  • Querying against realmResults
  • delete reamModels in cascading mode
  • support also for deleting methods found in realmResults, realmModel, realmObject and realmLists
  • support realmQuery.*Async() methods
  • realmResults.addChangeListener(), realmObject.addChangeListener()
  • realmResults.asObservable(),realmObject.asObservable(), not supporting realm.asObservable() at this time
  • Several features not covered will simply pass, and not perform anything. In this situation, I am going to include a console message with prefix #realm-tester and let you know when that occurs. The same rule will apply for features which I cover partially

realm-tester's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

realm-tester's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.