コード例 #1
0
        public void RegistersChangeNotificationsOfDefaultValues()
        {
            var model = new ModelWithObservableCollection();

            model.Collection.Add(4);

            Assert.IsTrue(model.HasCollectionChanged);
        }
コード例 #2
0
        public void AllowsRegistrationOfObservableCollection()
        {
            var model = new ModelWithObservableCollection();

            model.Collection = new ObservableCollection <int>(new List <int>()
            {
                1, 2, 3
            });

            model.Collection.Add(4);

            Assert.IsTrue(model.HasCollectionChanged);
        }