Example #1
0
        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));

        }
Example #2
0
        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");
            }
            
        }
Example #3
0
        public void AddCharater()
        {
            Player p = new Player("testName", "testPassword");

            p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior));
        }
Example #4
0
        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");
            }
        }
Example #5
0
        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);
        }
Example #6
0
        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");
            }
        }
Example #7
0
        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));
        }