def test_on_next_accept_action(): obs = [False] n1 = OnNext(42) def on_next(x): obs[0] = True return obs[0] def on_error(err): assert(False) def on_completed(): assert(False) n1.accept(on_next, on_error, on_completed) assert(obs[0])
def test_on_next_accept_action(): obs = [False] n1 = OnNext(42) def on_next(x): obs[0] = True return obs[0] def on_error(err): assert False def on_completed(): assert False n1.accept(on_next, on_error, on_completed) assert obs[0]
def test_on_next_accept_observer_with_result(): n1 = OnNext(42) def on_next(x): return "OK" def on_error(err): assert False def on_completed(): assert False res = n1.accept(AcceptObserver(on_next, on_error, on_completed)) assert 'OK' == res
def test_on_next_accept_observer_with_result(): n1 = OnNext(42) def on_next(x): return "OK" def on_error(err): assert(False) def on_completed(): assert(False) res = n1.accept(AcceptObserver(on_next, on_error, on_completed)) assert('OK' == res)
def test_on_next_accept_action_with_result(): n1 = OnNext(42) def on_next(x): return "OK" def on_error(err): assert (False) def on_completed(): assert (False) res = n1.accept(on_next, on_error, on_completed) assert ('OK' == res)
def test_on_next_accept_observer(): con = CheckOnNextObserver() n1 = OnNext(42) n1.accept(con) assert con.value == 42
def test_on_next_accept_observer(): con = CheckOnNextObserver() n1 = OnNext(42) n1.accept(con) assert(42 == con.value)