//checks that when you select a name from the list it actually is selecting the care you chose public void TestSelectedCard() { var cards = PokemonRepo.GetAllPokemonCards(); PokemonViewModel pvm = new PokemonViewModel(); Assert.AreEqual("Growlithe", pvm.SelectedPokemon.Name); }
//tests that the chosen pokemons attacks are actually that pokemons attacks public void TestAttack() { var cards = PokemonRepo.GetAllPokemonCards(); PokemonViewModel pvm = new PokemonViewModel(); pvm.SelectedPokemon = cards[0]; Assert.AreEqual("Flare", pvm.SelectedPokemon.Attacks[0].Name); }
//checks that the search funcionality is working as expected public void TestFilteringCards() { PokemonViewModel pvm = new PokemonViewModel(); var cards = PokemonRepo.GetAllPokemonCards(); pvm.Filter = "Charizard"; pvm.PerformFiltering(); Assert.IsTrue(cards.Count == 1); }
//checks that we have pulled all cards from api public void GetAllPokemonCards_GetsAllCards() { var cards = PokemonRepo.GetAllPokemonCards(); var firstCard = cards[0]; var name = firstCard.Name; Assert.IsTrue(cards.Count > 20); Assert.IsNotNull(firstCard); Assert.IsNotNull(name); }
public HomeController(ILogger <HomeController> logger, HomeRepo hrepo, PokemonRepo prepo) { _logger = logger; this.homeRepo = hrepo; this.pokemonRepo = prepo; }
public PokemonController(PokemonRepo pRepo, SoortRepo sRepo, AanvalRepo aRepo) { this.pokemonRepo = pRepo; this.soortRepo = sRepo; this.aanvalRepo = aRepo; }