public void RemoveCategoriesLinksThrowsExceptionWithNullFilterTest()
        {
            var cache  = Substitute.For <IMemoryCache>();
            var config = Substitute.For <ICacheConfig>();

            var sut = new CategoryCache(cache, config);

            Action action = () => sut.RemoveCategoryLinks(null);

            action.Should().Throw <ArgumentNullException>();
        }
        public void RemoveCategoriesLinksRemovesFromCacheTest()
        {
            var filter   = Model.Create <ProfileFilter>();
            var cache    = Substitute.For <IMemoryCache>();
            var config   = Substitute.For <ICacheConfig>();
            var cacheKey = "CategoryLinks|" + filter.CategoryGroup + "|" + filter.CategoryName;

            var sut = new CategoryCache(cache, config);

            sut.RemoveCategoryLinks(filter);

            cache.Received().Remove(cacheKey);
        }