示例#1
0
            public void Should_only_take_published()
            {
                var processor = new RssProcessor();

                var files = new List <Post>
                {
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.Private
                    },
                    new Post {
                        Published = Published.Draft
                    },
                };
                var posts = processor.GetPostsForRss(files, new SnowSettings {
                    FeedSize = 10
                });

                Assert.Equal(2, posts.Count);
            }
示例#2
0
            public void Should_take_ten()
            {
                var processor = new RssProcessor();

                var files = new List <Post>
                {
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                    new Post {
                        Published = Published.True
                    },
                };
                var posts = processor.GetPostsForRss(files, new SnowSettings {
                    PageSize = 10
                });

                Assert.Equal(10, posts.Count);
            }
            public void Should_only_take_published()
            {
                var processor = new RssProcessor();

                var files = new List<Post>
                {
                    new Post{ Published = Published.True},
                    new Post{ Published = Published.True},
                    new Post{ Published = Published.Private},
                    new Post{ Published = Published.Draft},
                };
                var posts = processor.GetPostsForRss(files);
                Assert.Equal(2, posts.Count);
            }
            public void Should_take_ten()
            {
                var processor = new RssProcessor();

                var files = new List<Post>
                {
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                   new Post{ Published = Published.True},
                };
                var posts = processor.GetPostsForRss(files);
                Assert.Equal(10, posts.Count);
            }