public void ReactiveQubject_Subscribe_NoLocalObserverSupportYet()
        {
            var q = new MyReactiveQubject <bool, int>(null);
            var o = new MyLocalObserver <int>();

            Assert.ThrowsException <NotSupportedException>(() => q.Subscribe(o, new Uri("bar://foo"), null));
        }
        public void ReactiveQubject_ElementType()
        {
            var q = new MyReactiveQubject <bool, int>(null);

            Assert.AreEqual(typeof(int), ((IReactiveQbservable)q).ElementType);
            Assert.AreEqual(typeof(bool), ((IReactiveQbserver)q).ElementType);
        }
        public void ReactiveQubject_Subscribe()
        {
            var p = new QueryProvider();
            var q = new MyReactiveQubject <bool, int>(p);
            var o = new MyReactiveQbserver <int>(p);
            var s = (IReactiveQubscription)q.Subscribe((IReactiveObserver <int>)o, new Uri("bar://foo"), null);

            Assert.IsNotNull(s.Expression);
        }
        public void ReactiveQubject_Subscribe_ArgumentChecking()
        {
            var q = new MyReactiveQubject <bool, int>(null);
            var o = new MyReactiveQbserver <int>(null);
            var u = new Uri("bar://foo");

#pragma warning disable IDE0034 // Simplify 'default' expression (documents the signature)
            Assert.ThrowsException <ArgumentNullException>(() => q.Subscribe(default(IReactiveQbserver <int>), u, null));
            Assert.ThrowsException <ArgumentNullException>(() => q.Subscribe(o, default(Uri), null));
#pragma warning restore IDE0034 // Simplify 'default' expression
        }