Ejemplo n.º 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));

        }
Ejemplo n.º 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");
            }
            
        }
Ejemplo n.º 3
0
        public void AddCharater()
        {
            Player p = new Player("testName", "testPassword");

            p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior));
        }
Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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));
        }