Beispiel #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");
            }
        }
Beispiel #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");
            }
        }
Beispiel #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);
        }