/// <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()); }
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."); }
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."); }