Example #1
0
        public void WatchListTriggersClear()
        {
            var wl = new WatchList<int>("carp");
            bool triggered = false;

            wl.AddRangeInternal(new int[] { 1, 2, 3 });

            wl.OnCollectionChanged += new CollectionChanged<int>(delegate(string name, IEnumerable<int> collection)
            {
                triggered = true;
            });

            wl.Clear();

            Assert.IsTrue(triggered);
        }