コード例 #1
0
        public void FeedExists_WhenFeedDoesNotExist_ReturnsFalse()
        {
            DataRepository underTest = new DataRepository(context);
            Feed nonExistantFeed = new Feed { Title = "feed", Url = "url" };

            Assert.IsFalse(underTest.FeedExists(nonExistantFeed));
        }
コード例 #2
0
        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));
        }