GetPosts() public method

public GetPosts ( int pageNumber, int pageSize, int categoryId = null, System.DateTime startDate = null, System.DateTime endDate = null ) : IEnumerable
pageNumber int
pageSize int
categoryId int
startDate System.DateTime
endDate System.DateTime
return IEnumerable
        public void GetPosts_ReturnsPosts()
        {
            // Arrange
            List<PostViewModel> serviceModel = new List<PostViewModel> { new PostViewModel { PostID = 1 }};
            _service.Stub(x => x.RecentPosts(1, 2, null, null, null)).Return(serviceModel);
            InsanelySimpleBlogPostController controller = new InsanelySimpleBlogPostController(_service);

            // Act
            IEnumerable<PostViewModel> model = controller.GetPosts(1, 2, null);

            // Assert
            Assert.That(model, Is.EqualTo(serviceModel));
        }