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()); }
public void Length_Is_Ok() { var item = new RandString().Gen(); Assert.True(item.Length == 4); }
public void String_Is_Not_Null() { var item = new RandString().Gen(); Assert.False(String.IsNullOrEmpty(item)); }