Esempio n. 1
0
        public void PostsToReadMeta()
        {
            var repository = Repository.CreatePopulatedRepository();
            var boardService = new BoardService(repository);

            var competitor = repository.GetBoardByIdWithCompetitors(1).Competitors.First();

            var meta = boardService.GetDiscussionMeta(1, competitor.Name);

            Assert.That(meta.NumberOfNewPosts, Is.GreaterThan(0));
            Assert.That(meta.NewPosts, Is.True);
        }
Esempio n. 2
0
        public void PostsAllReadMeta()
        {
            var repository = Repository.CreatePopulatedRepository();
            var boardService = new BoardService(repository);

            var competitor = repository.GetBoardByIdWithCompetitors(1).Competitors.First();

            competitor.LastViewedPostId = repository.Posts.Where(p => p.Board.BoardId == 1).Max(p => p.PostId);

            var meta = boardService.GetDiscussionMeta(1, competitor.Name);

            Assert.That(meta.NumberOfNewPosts, Is.EqualTo(0));
            Assert.That(meta.NewPosts, Is.False);
        }