public void TestRawNumberGenerationQuantity()
        {
            // Checking the size of the whole number list from the
            // range of min to max.
            var numberPool   = new NumberPool(0, 9999);
            var rawNumbers   = numberPool.GetRawNumberPool();
            int expectedSize = 10000;
            int actualSize   = rawNumbers.Count;

            Assert.AreEqual(expectedSize, actualSize);
        }
        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);
        }
Exemplo n.º 3
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);
        }