public void WeakBindingDoesNotRetainNotifier()
        {
            var binding   = new BindingClass();
            var notifying = new NotifyingClass();
            // Means of determining whether the class has been disposed
            var weakNotifying = new WeakReference <NotifyingClass>(notifying);
            // Retain binder, as that shouldn't affect anything
            var binder = binding.BindWeak(notifying);

            notifying = null;
            GC.Collect();
            Assert.IsFalse(weakNotifying.TryGetTarget(out notifying));
        }
        public void WeakBindingDoesNotRetainBindingClass()
        {
            var binding = new BindingClass();

            // Means of determining whether the class has been disposed
            var weakBinding = new WeakReference <BindingClass>(binding);

            var notifying = new NotifyingClass();

            binding.BindWeak(notifying);



            binding = null;
            GC.Collect();
            Assert.IsFalse(weakBinding.TryGetTarget(out binding));
        }
        public void WeakBindingDoesNotRetainNotifier()
        {
            var binding = new BindingClass();
            var notifying = new NotifyingClass();
            // Means of determining whether the class has been disposed
            var weakNotifying = new WeakReference<NotifyingClass>(notifying);
            // Retain binder, as that shouldn't affect anything
            var binder = binding.BindWeak(notifying);

            notifying = null;
            GC.Collect();
            Assert.IsFalse(weakNotifying.TryGetTarget(out notifying));
        }
        public void WeakBindingDoesNotRetainBindingClass()
        {
            var binding = new BindingClass();

            // Means of determining whether the class has been disposed
            var weakBinding = new WeakReference<BindingClass>(binding);

            var notifying = new NotifyingClass();
            binding.BindWeak(notifying);

            

            binding = null;
            GC.Collect();
            Assert.IsFalse(weakBinding.TryGetTarget(out binding));
        }