Ejemplo n.º 1
0
        public async Task When_yoda_translation_translate_description()
        {
            //ARRANGE
            _pokeAPIServiceMock.Setup(x => x.Get(It.IsAny <string>())).ReturnsAsync(CreateDummyDetails("cave"));
            _translateMock.Setup(x => x.TranslatePokemon(It.IsAny <PokedexDetails>())).ReturnsAsync(
                new TranslationResponse()
            {
                TranslatedContents = new TranslatedContents()
                {
                    Text = "YODA"
                }
            });
            //ACT
            var result = await _sut.GetPokemonDetailsTranslated("test");

            //ASSERT
            result.Description.ShouldBe("YODA");
        }
Ejemplo n.º 2
0
 public async Task <PokedexDetails> Translate(string name)
 {
     return(await _pokemonFacade.GetPokemonDetailsTranslated(name));
 }