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