Пример #1
0
        public void CanAddAndRemoveMultiplyNestedCategory()
        {
            const string catName = "Category.Child.Thing.That";

            search.AddCategory(catName);
            Assert.True(search.ContainsCategory(catName));
            search.RemoveCategory(catName);
            Assert.False(search.ContainsCategory(catName));
        }
Пример #2
0
        public void CanRunRemoveCategoryIfCategoryDoesntExist()
        {
            var search = new SearchModel();

            search.AddCategory("Peter.Boyer");

            search.RemoveCategory("Peter.Rabbit");
            Assert.IsNull(search.GetCategoryByName("Peter.Rabbit"));
        }