Exemple #1
0
 public ForumScanner(IRepository repository)
 {
     this.repo                 = repository;
     this.forumAccessor        = new ForumAccessor();
     this.pollInterval         = this.GetInterval();
     this.dayScanner           = new DayScanner(this.repo);
     this.voteScanner          = new VoteScanner(this.repo);
     this.firstForumPostNumber = ConfigurationManager.AppSettings["FirstForumPostNumber"] ?? "1";
 }
        public DayScannerTests()
        {
            var mockRepo = new Mock <IRepository>();

            mockRepo.Setup(r => r.FindDay(10))
            .Returns(new Day {
                Number = 10, StartForumPostNumber = "100", EndForumPostNumber = string.Empty
            });

            this.repo = mockRepo.Object;

            this.target = new DayScanner(this.repo);
        }