Exemple #1
0
        public void GetNewsItemComment(int newsItemCommentId)
        {
            string apiMethod = string.Format("/News/Comment/{0}", newsItemCommentId);

            _kayakoApiRequest.Setup(x => x.ExecuteGet <NewsItemCommentCollection>(apiMethod)).Returns(_responseNewsItemCommentCollection);

            var newsItemComment = _newsController.GetNewsItemComment(newsItemCommentId);

            _kayakoApiRequest.Verify(x => x.ExecuteGet <NewsItemCommentCollection>(apiMethod), Times.Once());
            Assert.That(newsItemComment, Is.EqualTo(_responseNewsItemCommentCollection.FirstOrDefault()));
        }