Esempio n. 1
0
        public void InvalidDeleteNonexistant()
        {
            Player p = new Player("testName", "testPassword");

            try
            {
                p.Delete(Guid.NewGuid());
                Assert.Fail();
            }
            catch(Exception ex)
            {
                Assert.AreEqual(ex.Message, "This Character does not exist");
            }
        }
Esempio n. 2
0
        public void InvalidDeleteAlreadyDeleted()
        {
            Player p = new Player("testName", "testPassword");

            p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior));

            try
            {
                p.Delete(p.Characters.First().Id);
                p.Delete(p.Characters.First().Id);
                Assert.Fail();
            }
            catch (Exception ex)
            {
                Assert.AreEqual(ex.Message, "This Character has already been deleted");
            }
        }
Esempio n. 3
0
        public void ValidDelete()
        {
            Player p = new Player("testName", "testPassword");

            p.AddCharacter(new Character("TestCharacter", CharacterFaction.Alliance, CharacterRace.Human, CharacterClass.Warrior));

            p.Delete(p.Characters.First().Id);
        }