public void RxTraceSourceOnNext() { var source = CreateTraceSource(); var xs = Observable.Range(0, 5); xs.TraceOnNext(source).Subscribe(); AssertEqual(Listener.Messages, Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(value))); }
public void IxTraceOnNext() { AddTraceListener(); var xs = Enumerable.Range(0, 5); xs.TraceOnNext().ForEach(); AssertEqual(Listener.Messages, Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(value))); RemoveTraceListener(); }
public void IxTraceSource() { var source = CreateTraceSource(); var xs = Enumerable.Range(0, 5); xs.Trace(source).ForEach(); AssertEqual(Listener.Messages, Concat( Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(value)), TraceDefaults.DefaultOnCompleted())); }
public void RxTrace() { AddTraceListener(); var xs = Observable.Range(0, 5); xs.Trace().Subscribe(); AssertEqual(Listener.Messages, Concat( Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(value)), TraceDefaults.DefaultOnCompleted())); RemoveTraceListener(); }
public void RxTraceSourceIdentity() { var source = CreateTraceSource(); var xs = Observable.Range(0, 5); for (int i = 0; i < 3; i++) { xs.TraceIdentity(source).Subscribe(); string id = GetCurrentId(); AssertEqual(Listener.Messages, Concat( Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(id, value)), TraceDefaults.DefaultOnCompleted(id))); Listener.Clear(); } }
public void IxTraceIdentity() { AddTraceListener(); var xs = Enumerable.Range(0, 5); for (int i = 0; i < 3; i++) { xs.TraceIdentity().ForEach(); string id = GetCurrentId(); AssertEqual(Listener.Messages, Concat( Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(id, value)), TraceDefaults.DefaultOnCompleted(id))); Listener.Clear(); } RemoveTraceListener(); }
public void IxTraceSourceIdentityOnNext() { var source = CreateTraceSource(); var xs = Enumerable.Range(0, 5); for (int i = 0; i < 3; i++) { xs.TraceIdentityOnNext(source).ForEach(); string id = GetCurrentId(); AssertEqual(Listener.Messages, Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(id, value))); Listener.Clear(); } }
public void RxTraceIdentityOnNext() { AddTraceListener(); var xs = Observable.Range(0, 5); for (int i = 0; i < 3; i++) { xs.TraceIdentityOnNext().Subscribe(); string id = GetCurrentId(); AssertEqual(Listener.Messages, Enumerable.Range(0, 5).Select(value => TraceDefaults.DefaultOnNext(id, value))); Listener.Clear(); } RemoveTraceListener(); }