Blog.Logic.Core.Tests.PostContentsLogicTest.ShouldReturnFalseWhenDeletePostContentFoundNoRecord C# (CSharp) Method

ShouldReturnFalseWhenDeletePostContentFoundNoRecord() private method

        public void ShouldReturnFalseWhenDeletePostContentFoundNoRecord()
        {
            _postContentRepository = new Mock<IPostContentRepository>();
            _postContentRepository.Setup(a => a.Find(It.IsAny<Expression<Func<PostContent, bool>>>(), false))
               .Returns(new List<PostContent>());

            _postContentsLogic = new PostContentsLogic(_postContentRepository.Object);

            var result = _postContentsLogic.Delete(1);

            Assert.IsFalse(result);
        }