Blog.Logic.Core.Tests.CommentsLogicTest.ShouldSearchComments C# (CSharp) Method

ShouldSearchComments() private method

private ShouldSearchComments ( ) : void
return void
        public void ShouldSearchComments()
        {
            _commentsRepository = new Mock<ICommentRepository>();
            _commentsRepository.Setup(a => a.SearchComments(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>()))
                .Returns(_comments);

            _userRepository = new Mock<IUserRepository>();

            _commentsLogic = new CommentsLogic(_commentsRepository.Object, _userRepository.Object);

            var results = _commentsLogic.SearchComments("foo", 1, 1);

            Assert.NotNull(results);
            Assert.IsInstanceOf(typeof(List<Common.Contracts.Comment>), results);
        }