Ejemplo n.º 1
0
        public void CharacterRatingContextInfosByCharacterId_Retrieved_Success()
        {
            IEnumerable <CharacterRatingContextInfo> results = _characterRatingLogic.GetCharacterRatingContextInfosByCharacterId(1);

            Assert.IsNotNull(results);
            Assert.AreEqual("Tyro", results.First().CharacterName);
        }
Ejemplo n.º 2
0
        public IActionResult GetCharacterRatingContextInfosByCharacterId(int characterId)
        {
            _logger.LogInformation($"Controller Method invoked: {nameof(GetCharacterRatingContextInfosByCharacterId)}");

            IEnumerable <CharacterRatingContextInfo> model = _characterRatingLogic.GetCharacterRatingContextInfosByCharacterId(characterId);

            IEnumerable <D.CharacterRatingContextInfo> result = _mapper.Map <IEnumerable <D.CharacterRatingContextInfo> >(model);

            return(new JsonResult(result, new JsonSerializerSettings()
            {
                Formatting = Formatting.Indented
            }));
        }