Exemplo n.º 1
0
        public IActionResult Index()
        {
            if (HttpContext.Session.GetInt32("count") == null)
            {
                HttpContext.Session.SetInt32("count", 5);
            }

            RandString newRandStr   = new RandString(14);
            string     randPasscode = newRandStr.LettersNums;

            ViewBag.Count        = HttpContext.Session.GetInt32("count");
            ViewBag.randPasscode = randPasscode;
            return(View());
        }
Exemplo n.º 2
0
        public void Length_Is_Ok()
        {
            var item = new RandString().Gen();

            Assert.True(item.Length == 4);
        }
Exemplo n.º 3
0
        public void String_Is_Not_Null()
        {
            var item = new RandString().Gen();

            Assert.False(String.IsNullOrEmpty(item));
        }