public void TestUpdateSpellsPerDayByLevel() { // Arrange Bard bard = new Bard("bard"); int[] SpellsPerDayLevel_11 = new int[10] { 3, 3, 3, 3, 1, 0, 0, 0, 0, 0 }; int[] ReturnedSpellsPerDay = new int[10]; int level = 11; try { // Act bard.UpdateSpellsPerDay(); // Assert ReturnedSpellsPerDay = Enumerable.Range(0, bard.DailySpells.GetLength(0)) .Select(x => bard.DailySpells[x, level - 1]) .ToArray(); Assert.Equal(SpellsPerDayLevel_11, ReturnedSpellsPerDay); } catch { } }
public void TestBardSpellsPerDay() { // Arrange Bard bard = new Bard("bard"); int[,] SpellsPerDayBard = new int[20, 10] { { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 3, 1, 0, 0, 0, 0, 0, 0, 0 }, { 3, 3, 2, 0, 0, 0, 0, 0, 0, 0 }, { 3, 3, 2, 0, 0, 0, 0, 0, 0, 0 }, { 3, 3, 3, 1, 0, 0, 0, 0, 0, 0 }, { 3, 3, 3, 2, 0, 0, 0, 0, 0, 0 }, { 3, 3, 3, 2, 0, 0, 0, 0, 0, 0 }, { 3, 3, 3, 3, 1, 0, 0, 0, 0, 0 }, { 3, 3, 3, 3, 2, 0, 0, 0, 0, 0 }, { 3, 3, 3, 3, 2, 0, 0, 0, 0, 0 }, { 4, 3, 3, 3, 3, 1, 0, 0, 0, 0 }, { 4, 4, 3, 3, 3, 2, 0, 0, 0, 0 }, { 4, 4, 4, 3, 3, 2, 0, 0, 0, 0 }, { 4, 4, 4, 4, 3, 3, 1, 0, 0, 0 }, { 4, 4, 4, 4, 4, 3, 2, 0, 0, 0 }, { 4, 4, 4, 4, 4, 4, 3, 0, 0, 0 }, { 4, 4, 4, 4, 4, 4, 4, 0, 0, 0 } }; try { // Act bard.UpdateSpellsPerDay(); // Assert Assert.Equal(SpellsPerDayBard, bard.DailySpells); } catch { } }