public void RemoveCategoriesRemovesFromCacheTest() { var cache = Substitute.For <IMemoryCache>(); var config = Substitute.For <ICacheConfig>(); var sut = new CategoryCache(cache, config); sut.RemoveCategories(); cache.Received().Remove("Categories"); }