public async Task SortByType() { if (PokemonTypeProperty.Equals("All") == false) { var pokemonInfo = await _pokeService.GetPokemonByType(PokemonTypeProperty); SortedPokemonNames = _pokeService.PokemonEnumerabletoStringConverter(pokemonInfo); } else { SortedPokemonNames = AllPokemonNames; } }
public async Task UserEntersPokemonType_GetsAllPokemonOfThatType() { string type = "flying"; //var PokeService = new Mock<PokeInformationService>(); var PokeService = new PokeInformationService(); var Pokemons = await PokeService.GetPokemonByType(type); foreach (var pokemon in Pokemons) { if (pokemon.PokemonTypes[0].PokemonType.Name.Equals(type) == false) { if (pokemon.PokemonTypes[1].PokemonType.Name.Equals(type) == false) { Assert.Fail(); } } } Assert.Pass(); }