Ejemplo n.º 1
0
        public void GetAllPostsUnitTest()
        {
            bool IsPageGetAllPostsCalled = false;
            this.FacebookPageStub = new StubIFacebookPage()
            {
                GetAllPosts = () => { IsPageGetAllPostsCalled = true; return new List<IFacebookPost>(); }
            };
            this.facade = new FacebookFacade(FacebookPageStub);
            facade.GetAllPosts();

            Assert.IsTrue(IsPageGetAllPostsCalled, "Page.GetAllPosts not called from Facade.");
        }
Ejemplo n.º 2
0
        public void GetAllPostsTest()
        {
            this.facade = new FacebookFacade();
            List<IFacebookPost> result = (List<IFacebookPost>)facade.GetAllPosts();

            Assert.IsNotNull(result, "Posting are not returned by the page.");
            Assert.IsTrue(result.Count > 0, "There are no posts on page.");
        }