public async Task AllLinksRepositoryTest() { providerClass provider = new providerClass(); ILinkRepository repository = provider.giveRepository(); ApplicationDbContext context = provider.giveContext(); List <Link> repositoryList = await repository.AllLinksToListAsync(); List <Link> contextList = await context.Links.Include <Link, Category>(l => l.category).ToListAsync(); Assert.That(repositoryList, Is.EqualTo(contextList)); /* * foreach (Link link in repositoryList) * { * Link contextLink = contextList.Single(l => l.LinkId == link.LinkId); * contextLink.category = new Category(); * contextLink.category.UrlSlug = "notthis"; * Assert.AreEqual(link, contextLink); * Assert.AreEqual(link.category.UrlSlug, contextLink.category.UrlSlug); * } */ }