Exemplo n.º 1
0
        public void RemoveFilter_ListWith2Filters_RemovedFilterNoLongerInList()
        {
            DateFilter dateFilter = new DateFilter(DateTime);

            CategoryFilterCollection.Instance.ToggleCategory(OffenceCategories.Cybercrime);
            FilterList.AddFilter(CategoryFilterCollection.Instance);
            FilterList.AddFilter(dateFilter);
            Assert.AreEqual(2, FilterList.GetFilters().Count);
            FilterList.RemoveFilter($"{typeof(DateFilter)}");
            Assert.AreEqual(1, FilterList.GetFilters().Count);
            Assert.IsFalse(FilterList.GetFilters().Contains(dateFilter));
        }