예제 #1
0
        public void CanDeleteDraft_should_not_throw_exception()
        {
            var content = CreateDraftContent(Status.Draft);
            var command = new DeleteContentDraft();

            GuardContent.CanDeleteDraft(command, content);
        }
예제 #2
0
        public void CanDeleteDraft_should_throw_exception_if_no_draft_found()
        {
            var content = CreateContent(Status.Published);

            var command = CreateCommand(new DeleteContentDraft());

            Assert.Throws <DomainException>(() => GuardContent.CanDeleteDraft(command, content));
        }