public void GenerarClave_GetString_ShouldReturnString() { var result = _claves.DameClave(); result.Should().BeOfType <string>(); ; }
public IActionResult Nuevo() { var clave = _claves.DameClave(); HttpContext.Session.SetString("Clave", clave); var modo = Enum.GetNames(typeof(Queue)).ToList(); // var modo = Gamemode(); var idioma = Enum.GetNames(typeof(Language)).ToList(); var server = Enum.GetNames(typeof(Region)).ToList(); var lista_idiomas = new List <string>(); foreach (var i in idioma) { var rep = i.Replace("_", "-"); try { var idiomanombre = new CultureInfo(rep).DisplayName; lista_idiomas.Add(idiomanombre); } catch (Exception) { } } var posicion = Enum.GetNames(typeof(TagStatic)).ToList(); // var Campeones = staticApi.GetChampions(Region.euw, ChampionData.image, Language.es_ES).Champions.ToList(); ViewBag.Campeones = new SelectList(_staticApi.GetChampions(Region.euw, ChampionData.image, Language.es_ES).Champions, "Value", "Key").ToList().OrderBy(o => o.Text); ViewBag.Modo = new SelectList(modo); ViewBag.IdiomaC = new SelectList(lista_idiomas); ViewBag.PosicionC = new SelectList(posicion); ViewBag.ServerC = new SelectList(server); ViewBag.Palabro = clave; return(View(new Entrada())); }