Beispiel #1
0
        public void GetSubPosts_Paging_Loop()
        {
            var         session = User.Login(Configuration.GetKey("username"), Configuration.GetKey("password"));
            var         list    = new PostListing();
            PostListing page    = null;

            do
            {
                page = Sub.GetListing(session,
                                      SubRedditToTestWith,
                                      page == null ? string.Empty : page.After);

                list.AddRange(page);
            } while (!string.IsNullOrEmpty(page.After));

            Assert.IsNotNull(list);
            Assert.IsTrue(list.Count > 0);
        }
Beispiel #2
0
        public void GetSubPosts_Paging_Loop()
        {
            var session = User.Login(Configuration.GetKey("username"), Configuration.GetKey("password"));
            var list = new PostListing();
            PostListing page = null;

            do
            {
                page = Sub.GetListing(session,
                                      SubRedditToTestWith,
                                      page == null ? string.Empty : page.After);

                list.AddRange(page);

            } while (!string.IsNullOrEmpty(page.After));

            Assert.IsNotNull(list);
            Assert.IsTrue(list.Count > 0);
        }