示例#1
0
        private static void TestIFoo(IFoo foo)
        {
            const string testValue = "123";
            var          result    = string.Empty;

            foo.FromPropertyChanged(o => o.MyStringProperty)
            .Subscribe(value => result = value);

            foo.MyStringProperty = testValue;
            Assert.Equal(testValue, result);
            // setter above increments Count as does the extension when it gets the property value
            Assert.Equal(2, foo.Count);

            Assert.True(true);
        }