예제 #1
0
        public void TestSortingSetFalse()
        {
            var sorter = new IntListSorter(1, 5);

            sorter.Sort();
            Assert.IsFalse(sorter.Sorting);
        }
예제 #2
0
        public void TestSortingSetTrue()
        {
            bool sorting = false;
            var  sorter  = new IntListSorter(1, 5);

            void IntListSorter_PropertyChanged(object sender, PropertyChangedEventArgs e)
            {
                if (sorter.Sorting)
                {
                    sorting = true;
                }
            }

            sorter.PropertyChanged += IntListSorter_PropertyChanged;
            sorter.Sort();
            Assert.IsTrue(sorting);
        }