package Ġcom . bad oo . reak t ive . single Ċ Ċ import Ġcom . bad oo . reak t ive . test . observable . assert Complete Ċ import Ġcom . bad oo . reak t ive . test . observable . assert Value Ċ import Ġcom . bad oo . reak t ive . test . observable . test Ċ import Ġcom . bad oo . reak t ive . test . single . Test Single Ċ import Ġkotlin . test . Test Ċ Ċ class ĠAs Observable Test Ġ: ĠSingle To Observable Tests Ġby ĠSingle To Observable Tests Impl ({ Ġas Observable () Ġ}) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġupstream Ġ= ĠTest Single < Int ?> () ĊĠĠĠ Ġprivate Ġval Ġobserver Ġ= Ġupstream . as Observable (). test () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġemits _ value _ WHEN _ upstream _ succeeded _ with _ non _ null _ value () Ġ{ ĊĠĠĠĠĠĠĠ Ġupstream . on Success ( 0 ) ĊĊĠĠĠĠĠĠĠ Ġobserver . assert Value ( 0 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġemits _ value _ WHEN _ upstream _ succeeded _ with _ null _ value () Ġ{ ĊĠĠĠĠĠĠĠ Ġupstream . on Success ( null ) ĊĊĠĠĠĠĠĠĠ Ġobserver . assert Value ( null ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcompletes _ WHEN _ upstream _ succeeded _ with _ non _ null _ value () Ġ{ ĊĠĠĠĠĠĠĠ Ġupstream . on Success ( 0 ) ĊĊĠĠĠĠĠĠĠ Ġobserver . assert Complete () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcompletes _ WHEN _ upstream _ succeeded _ with _ null _ value () Ġ{ ĊĠĠĠĠĠĠĠ Ġupstream . on Success ( null ) ĊĊĠĠĠĠĠĠĠ Ġobserver . assert Complete () ĊĠĠĠ Ġ} Ċ } Ċ