public void MakeObjectReactiveHelperSmokeTest()
        {
            var fixture = new NonReactiveINPCObjectMadeReactive();
            var output = fixture.Changed.CreateCollection();

            Assert.Equal(0, output.Count);

            var input = new TestFixture();
            fixture.InpcProperty = input;

            Assert.Equal(1, output.Count);
            Assert.Equal(fixture, output[0].Sender);
            Assert.Equal("InpcProperty", output[0].PropertyName);
        }
        public void MakeObjectReactiveHelperSmokeTest()
        {
            var fixture = new NonReactiveINPCObjectMadeReactive();
            var output  = fixture.Changed.CreateCollection();

            Assert.Equal(0, output.Count);

            var input = new TestFixture();

            fixture.InpcProperty = input;

            Assert.Equal(1, output.Count);
            Assert.Equal(fixture, output[0].Sender);
            Assert.Equal("InpcProperty", output[0].PropertyName);
        }
        public void EventBinderBindsToExplicitEvent()
        {
            var input   = new NonReactiveINPCObjectMadeReactive();
            var fixture = new CreatesCommandBindingViaEvent();
            var cmd     = new ReactiveCommand();

            Assert.True(fixture.GetAffinityForObject(input.GetType(), true) > 0);
            Assert.False(fixture.GetAffinityForObject(input.GetType(), false) > 0);

            bool wasCalled = false;

            cmd.Subscribe(_ => wasCalled = true);

            var disp = fixture.BindCommandToObject <PropertyChangedEventArgs>(cmd, input, Observable.Return((object)5), "PropertyChanged");

            input.InpcProperty = new TestFixture();
            Assert.True(wasCalled);

            wasCalled = false;
            disp.Dispose();
            input.InpcProperty = new TestFixture();
            Assert.False(wasCalled);
        }