예제 #1
0
 /// <summary>
 /// Get comments on a given post.
 /// </summary>
 /// <param name="postID">Post ID</param>
 /// <returns>Returns List of all the comments on the post</returns>
 public IEnumerable <FacebookComment> GetAllCommentsForPost(string postID)
 {
     if (null == postID)
     {
         throw new ArgumentNullException("PostID", "Cannot get the comments for null post ID.");
     }
     return(page.GetAllCommentsForPost(postID));
 }
예제 #2
0
        public void GetAllCommentsWithValidParameterTest()
        {
            bool IsFAgentGetAllCommentsCalled = false;
            this.fAgent = new StubIFacebookAgent()
            {
                IsLoggedGet = () => {return true; },
                GetAllCommentsForPostString = (postID) => { IsFAgentGetAllCommentsCalled = true; return new List<FacebookComment>(); }
            };
            this.target = new FacebookPage(fAgent);
            target.GetAllCommentsForPost("132");

            Assert.IsTrue(IsFAgentGetAllCommentsCalled, "Facade didn't call FacebookAgent.GetAllComments.");
        }
예제 #3
0
        public void GetAllCommentsWithValidParameterTest()
        {
            bool IsFAgentGetAllCommentsCalled = false;

            this.fAgent = new StubIFacebookAgent()
            {
                IsLoggedGet = () => { return(true); },
                GetAllCommentsForPostString = (postID) => { IsFAgentGetAllCommentsCalled = true; return(new List <FacebookComment>()); }
            };
            this.target = new FacebookPage(fAgent);
            target.GetAllCommentsForPost("132");

            Assert.IsTrue(IsFAgentGetAllCommentsCalled, "Facade didn't call FacebookAgent.GetAllComments.");
        }