Ejemplo n.º 1
0
        public async Task When_given_a_valid_pokemon_return_mapped_object()
        {
            //ARRANGE

            _pokeAPIServiceMock.Setup(x => x.Get(It.IsAny <string>())).ReturnsAsync(CreateDummyDetails("cave"));

            //ACT
            var result = await _sut.GetPokemonDetails("test");

            //ASSERT
            result.Description.ShouldBe("Test Content");
            result.Habitat.ShouldBe("cave");
            result.IsLegendary.ShouldBeFalse();
            result.Name.ShouldBe("Test Pokemon");
        }
Ejemplo n.º 2
0
 public async Task <PokedexDetails> Get(string name)
 {
     return(await _pokemonFacade.GetPokemonDetails(name));
 }