Пример #1
0
        public void GetAllCommentsTest()
        {
            this.facade = new FacebookFacade();
            List<FacebookComment> result = (List<FacebookComment>)facade.GetAllCommentsForPost("438137436258804_450569895015558");

            Assert.IsNotNull(result, "GetAllComments not working.");
            Assert.IsTrue(result.Count > 0, "There are no comments for the post.");
        }
Пример #2
0
 public void GetAllCommentsWithNullParameterTest()
 {
     this.FacebookPageStub = new StubIFacebookPage()
     {
         GetAllCommentsForPostString = (postID) => { return new List<FacebookComment>(); }
     };
     this.facade = new FacebookFacade(FacebookPageStub);
     facade.GetAllCommentsForPost(null);
 }
Пример #3
0
        public void GetAllCommentsWithValidParameterTest()
        {
            bool IsPageGetAllCommentsCalled = false;
            this.FacebookPageStub = new StubIFacebookPage()
            {
                GetAllCommentsForPostString = (postID) => { IsPageGetAllCommentsCalled = true; return new List<FacebookComment>(); }
            };
            this.facade = new FacebookFacade(FacebookPageStub);
            facade.GetAllCommentsForPost("132");

            Assert.IsTrue(IsPageGetAllCommentsCalled, "Facade didn't call Page.GetAllComments.");
        }