Esempio n. 1
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 5
0
        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();
            }
        }
Esempio n. 6
0
        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();
        }