/// <summary>
        ///     Runs a virtual bill validator, forever
        /// </summary>
        /// <param name="logger">Logger attaches to emulator</param>
        private static void RunEmulator(ILogger logger)
        {
            var runner = new EmulationRunner <ApexEmulator>(TimeSpan.FromMilliseconds(1),
                                                            s_cancellationTokenSource.Token, logger);

            runner.CreditEveryNLoops(10, -1, 1, 2, 3, 4, 5, 6, 7);
        }
        public void CreditSequenceTest()
        {
            // Setup
            const int  pollsBetween = 5;
            const int  creditCount  = 10;
            const byte creditIndex  = 1;
            var        runner       = new EmulationRunner <ApexEmulator>(TimeSpan.FromMilliseconds(1));
            var        expected     = Enumerable.Repeat(creditIndex, creditCount).ToList();

            // Execute
            var emulator = runner.CreditEveryNLoops(pollsBetween, creditCount, creditIndex);

            // Assert
            Assert.AreEqual(expected, emulator.IssueCredits.ToList());
        }