Ejemplo n.º 1
0
        public void DeleteDraft_RemovesFromSet()
        {
            EFBlogPostRepository repo = new EFBlogPostRepository(SharedDbContext);

            var id    = repo.Drafts.Select(d => d.BlogPostTemplateId).First();
            var draft = repo.GetDraftById(id);
            var title = draft.PageTitle;

            repo.DeleteDraft(draft);

            var shouldBeNull = repo.GetDraftById(id);

            Assert.IsNull(shouldBeNull);
        }