public void ClearCacheClearsExistingAnswersAndCaches() { var cache = new Cache { Answers = new List <Answer> { sampleAnswer, anotherAnswer } }; repo.Save(cache); repo.Commit(); repo.ClearCache(); Assert.Equal(0, assertContext.Caches.Count()); Assert.Equal(0, assertContext.Answers.Count()); var assertCache = assertContext.Caches.Include(x => x.Answers).FirstOrDefault(); Assert.Null(assertCache); }