예제 #1
0
 /// <summary>
 /// Gets information of all the posts of type "picture" for a given Facebook page.
 /// </summary>
 /// <returns>IEnumerable of all the Posts</returns>
 public IEnumerable <IFacebookPost> GetAllPosts()
 {
     if (null == page)
     {
         page = new FacebookPage();
     }
     return(page.GetAllPosts());
 }
예제 #2
0
        public void GetAllPostsTest()
        {
            bool IsFAgentGetAllPostsCalled = false;

            this.fAgent = new StubIFacebookAgent()
            {
                IsLoggedGet = () => { return(true); },
                GetAllFeeds = () => { IsFAgentGetAllPostsCalled = true; return(new List <IFacebookPost>()); }
            };
            this.target = new FacebookPage(fAgent);
            target.GetAllPosts();

            Assert.IsTrue(IsFAgentGetAllPostsCalled, "Page.GetAllPosts not called from Facade.");
        }
예제 #3
0
        public void GetAllPostsTest()
        {
            bool IsFAgentGetAllPostsCalled = false;
            this.fAgent = new StubIFacebookAgent()
            {
                IsLoggedGet = () => { return true; },
                GetAllFeeds = () => { IsFAgentGetAllPostsCalled = true; return new List<IFacebookPost>(); }
            };
            this.target = new FacebookPage(fAgent);
            target.GetAllPosts();

            Assert.IsTrue(IsFAgentGetAllPostsCalled, "Page.GetAllPosts not called from Facade.");
        }