public void SubscriptionToWhenAnyShouldReturnCurrentValue()
        {
            var obj           = new HostTestFixture();
            var observedValue = 1;

            obj.WhenAnyValue(x => x.SomeOtherParam).Subscribe(x => observedValue = x);

            obj.SomeOtherParam = 42;

            Assert.True(observedValue == obj.SomeOtherParam);
        }
        public void WhenAnyValueSmokeTest()
        {
            new TestScheduler().With(
                sched =>
            {
                var fixture = new HostTestFixture
                {
                    Child = new TestFixture()
                };
                fixture.SomeOtherParam        = 5;
                fixture.Child.IsNotNullString = "Foo";

                var output1 = new List <int>();
                var output2 = new List <string>();
                fixture.WhenAnyValue(
                    x => x.SomeOtherParam,
                    x => x.Child.IsNotNullString,
                    (sop, nns) => new
                {
                    sop,
                    nns
                }).Subscribe(
                    x =>
                {
                    output1.Add(x.sop);
                    output2.Add(x.nns);
                });

                sched.Start();
                Assert.Equal(1, output1.Count);
                Assert.Equal(1, output2.Count);
                Assert.Equal(5, output1[0]);
                Assert.Equal("Foo", output2[0]);

                fixture.SomeOtherParam = 10;
                sched.Start();
                Assert.Equal(2, output1.Count);
                Assert.Equal(2, output2.Count);
                Assert.Equal(10, output1[1]);
                Assert.Equal("Foo", output2[1]);

                fixture.Child.IsNotNullString = "Bar";
                sched.Start();
                Assert.Equal(3, output1.Count);
                Assert.Equal(3, output2.Count);
                Assert.Equal(10, output1[2]);
                Assert.Equal("Bar", output2[2]);
            });
        }