예제 #1
0
        public async Task GetSpellUrlByIdShouldThrowInvalidOperationExceptionIfGivenInvalidId()
        {
            int invalidSpellId = 1322;
            var service        = new SpellsService();

            await Assert.ThrowsAsync <InvalidOperationException>(async() => await service.GetSpellUrlById(invalidSpellId));
        }
예제 #2
0
        public async Task GetSpellUrlByIdShouldReturnTheImageUrlOfTheSpell()
        {
            int    spellId           = 4;
            string expectedResultUrl = "http://ddragon.leagueoflegends.com/cdn/10.25.1/img/spell/SummonerFlash.png";

            var service = new SpellsService();

            var result = await service.GetSpellUrlById(spellId);

            Assert.Equal(expectedResultUrl, result);
        }