public void EnsureGetNextNumericCodeAsStringReturnsGoodCodesTest2()
        {
            int    alphaNumericLength = 0;
            int    alphaLength        = 2;
            int    numericLength      = 4;
            bool   isRandomized       = false;
            string lastCode           = "AN6665";

            var generatedCode = AttendanceCodeService.GetNextNumericCodeAsString(alphaNumericLength, alphaLength, numericLength, isRandomized, lastCode);

            Assert.AreEqual("6670", generatedCode);
        }
Beispiel #2
0
        public void AvoidTripleSix()
        {
            int    alphaNumericLength = 0;
            int    alphaLength        = 0;
            int    numericLength      = 4;
            bool   isRandomized       = false;
            string lastCode           = "0665";

            string code = AttendanceCodeService.GetNextNumericCodeAsString(alphaNumericLength, alphaLength, numericLength, isRandomized, lastCode);

            Assert.Equal("0667", code);
        }