Search in sources :

Example 6 with Completable

use of io.reactivex.Completable in project rxjava2-jdbc by davidmoten.

the class DatabaseTest method testComplete.

@Test
public void testComplete() throws InterruptedException {
    Database db = db(1);
    Completable a = //
    db.update(//
    "update person set score=-3 where name='FRED'").complete();
    //
    db.update("update person set score=-4 where score = -3").dependsOn(//
    a).counts().test().assertValue(//
    1).assertComplete();
}
Also used : Completable(io.reactivex.Completable) Test(org.junit.Test)

Aggregations

Completable (io.reactivex.Completable)6 Test (org.junit.Test)6 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 Flowable (io.reactivex.Flowable)1 Scheduler (io.reactivex.Scheduler)1 Action (io.reactivex.functions.Action)1 TestScheduler (io.reactivex.schedulers.TestScheduler)1