public async Task GetSpellUrlByIdShouldThrowInvalidOperationExceptionIfGivenInvalidId() { int invalidSpellId = 1322; var service = new SpellsService(); await Assert.ThrowsAsync <InvalidOperationException>(async() => await service.GetSpellUrlById(invalidSpellId)); }
public SpellSchoolsViewModel() { Title = "Spell Schools"; var ss = new SpellsService(); SpellSchools = ss.GetSpellTypes(); }
private void CheckBox_CheckedChanged(object sender, CheckedChangedEventArgs e) { var ss = new SpellsService(); var bookChecked = (CheckBox)sender; ss.UpdateSpellCheck(bookChecked.IsChecked, Spell); }
public SpellsViewModel() { var ss = new SpellsService(); Spells = ss.GetSpellsByType(SpellSchool); Title = SpellSchool; }
private void SetSpells() { var ss = new SpellsService(); SpellTotal = ss.GetTotal(); SpellComplete = ss.GetNumberOfComplete(); }
private void CheckBox_CheckedChanged(object sender, CheckedChangedEventArgs e) { var bs = new SpellsService(); var spellChecked = (CheckBox)sender; Spell spell = spellChecked.BindingContext as Spell; bs.UpdateSpellCheck(spellChecked.IsChecked, spell); }
public SpellsViewModel(string spellSchool) { SpellSchool = spellSchool; var ss = new SpellsService(); Spells = ss.GetSpellsByType(SpellSchool); Title = SpellSchool; }
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); }
public SpellViewModel(Spell spell) { Spell = spell; Title = spell.Name; var ss = new SpellsService(); SpellLocations = ss.GetLocationsBySpell(Spell); if (SpellLocations.Count == 0) { return; } HasLocationLinks = true; }
private static async Task GetSpells() { string saveLocation = Path.Combine(Directory.GetCurrentDirectory(), "Spells"); SpellsService spellService = new SpellsService(); try { IEnumerable <Spell> spells = await spellService.GetSpells(); SaveJson(spells, saveLocation, "spells"); } catch (Exception ex) { Logger.LogError(ex.Message); } }
public SpellsController(SpellsService service) { _service = service; }