public void CountTicketsPiterAlgorithmTest(int maxlimit, int expectedCount) { TicketCounter counter = new TicketCounter(new PiterAlgorithm()); int actualTicketCounts; //Act actualTicketCounts = counter.CountTickets((uint)maxlimit); //Assert Assert.AreEqual(expectedCount, actualTicketCounts); }
private void AddAlgorithmCountersToList(ILuckyTicketCounterAlgorithm[] _algorithmsArr) { uint limit = 0; TicketCounter _ticketCounter = null; foreach (ILuckyTicketCounterAlgorithm algorithm in _algorithmsArr) { _viewer.ShowMessage(algorithm.ToString()); _ticketCounter = new TicketCounter(algorithm); limit = GetAlgorithmTicketMaxLimit(algorithm.ToString()); if (limit == 0) { limit = DEFAULT_LIMIT; } _ticketCounter.CountTickets(limit); _counters.Add(_ticketCounter); } }