public void TestSortingSetFalse() { var sorter = new IntListSorter(1, 5); sorter.Sort(); Assert.IsFalse(sorter.Sorting); }
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); }