public void TestSortedNumberGenerationQuantity()
        {
            // Checking the size of sorted list which consists of
            // numbers following given conditions strictly.
            var numberPool    = new NumberPool(0, 9999);
            var rawNumbers    = numberPool.GetRawNumberPool();
            var sortedNumbers = numberPool.GetSortedNumberPool(rawNumbers);
            int expectedSize  = 7153;
            int actualSize    = sortedNumbers.Count;

            Assert.AreEqual(expectedSize, actualSize);
        }
예제 #2
0
        public void TestPINGenerationQuantity()
        {
            // Checking total number of PINs will be created per batch.
            var numberPool    = new NumberPool(0, 9999);
            var rawNumbers    = numberPool.GetRawNumberPool();
            var sortedNumbers = numberPool.GetSortedNumberPool(rawNumbers);
            var pinGenerator  = new PINGenerator(sortedNumbers);
            var pinBatch      = pinGenerator.GetNewBatch();
            int expectedSize  = 1000;
            int actualSize    = pinBatch.Count;

            Assert.AreEqual(expectedSize, actualSize);
        }