public VoteScannerTests() { var players = new Player[] { new Player { Name = "John0", Participating = true, Aliases = new string[] { "John" } }, new Player { Name = "Xevious", Participating = true, Aliases = new string[0] }, new Player { Name = "snowbind", Participating = true, Aliases = new string[0] }, new Player { Name = "GMass", Participating = true, Aliases = new string[0] }, new Player { Name = "Liamness", Participating = true, Aliases = new string[0] }, new Player { Name = "spork", Participating = true, Aliases = new string[0] }, new Player { Name = "Alask", Participating = true, Aliases = new string[0] }, new Player { Name = "PaulM", Participating = true, Aliases = new string[0] }, new Player { Name = "Danster", Participating = true, Aliases = new string[0] }, new Player { Name = "gospvg", Participating = true, Aliases = new string[0] }, new Player { Name = "Strategos", Participating = true, Aliases = new string[0] }, new Player { Name = "bennette98", Participating = true, Aliases = new string[0] }, new Player { Name = "Don Wiskerando", Participating = true, Aliases = new string[0] }, new Player { Name = "The Grand Pursuivant", Participating = true, Aliases = new string[0] }, new Player { Name = "Mr. Blonde", Participating = true, Aliases = new string[0] }, new Player { Name = "Mr. Violet", Participating = true, Aliases = new string[] { "Mr Violet", "Violet", "Mr.Violet", "MrViolet" } }, new Player { Name = "Mr. Viridian", Participating = true, Aliases = new string[] { "Mr.Viridian", "Mr Viridian", "Viridian", "MrViridian" } }, new Player { Name = "Moderator", Participating = false, Aliases = new string[0] }, new Player { Name = "Player With Aliases", Participating = true, Aliases = new string[] { "PlayerWithAliases", "PWA" } }, }; var mockRepo = new Mock<IRepository>(); mockRepo.Setup(m => m.FindAllPlayers()) .Returns(players); _voteScanner = new VoteScanner(mockRepo.Object); }
public ForumScanner(IRepository repository) { _repo = repository; _forumAccessor = new ForumAccessor(); _pollInterval = GetInterval(); _dayScanner = new DayScanner(_repo); _voteScanner = new VoteScanner(_repo); _firstForumPostNumber = ConfigurationManager.AppSettings["FirstForumPostNumber"] ?? "1"; }
public VoteController(IRepository repo) { _repo = repo; _voteScanner = new VoteScanner(_repo); }