public void AddValidDeathKnight() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior)); p.Characters.First().Level = 55; p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.DeathKnight)); }
public void AddInvalidDeathKnight() { Player p = new Player("testName", "testPassword"); try { p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.DeathKnight)); Assert.Fail(); } catch(Exception ex) { Assert.AreEqual(ex.Message, "Cannot create a Death Knight untill one of your Characters is at least level 55"); } }
public void AddCharater() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior)); }
public void InvalidUndeleteAlreadyUndeleted() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior)); try { p.Undelete(p.Characters.First().Id); Assert.Fail(); } catch (Exception ex) { Assert.AreEqual(ex.Message, "This Character is already undeleted"); } }
public void ValidUndelete() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior)); p.Characters.First().Active = false; p.Undelete(p.Characters.First().Id); }
public void AddInvalidFactionCharacter() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Horde, CharacterRace.Orc, CharacterClass.Warrior)); try { p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior)); Assert.Fail(); } catch (Exception ex) { Assert.AreEqual(ex.Message, "Stay loyal to your faction and only create characters within the same faction"); } }
public void AddValidFactionCharacter() { Player p = new Player("testName", "testPassword"); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Horde, CharacterRace.Orc, CharacterClass.Warrior)); p.AddCharacter(new Character("TestCharacter", CharacterFaction.Horde, CharacterRace.Tauren, CharacterClass.Druid)); }