public void FeedExists_WhenFeedDoesNotExist_ReturnsFalse() { DataRepository underTest = new DataRepository(context); Feed nonExistantFeed = new Feed { Title = "feed", Url = "url" }; Assert.IsFalse(underTest.FeedExists(nonExistantFeed)); }
public void FeedExists_WhenFeedExists_ReturnsTrue() { Feed existingFeed = new Feed { Title = "feed", Url = "url" }; context.Feeds.Add(existingFeed); context.SaveChanges(); DataRepository underTest = new DataRepository(context); Assert.IsTrue(underTest.FeedExists(existingFeed)); }