Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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);
        }