public void InvalidUndeleteNonexistant() { Player p = new Player("testName", "testPassword"); try { p.Undelete(Guid.NewGuid()); Assert.Fail(); } catch (Exception ex) { Assert.AreEqual(ex.Message, "This Character does not exist"); } }
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"); } }
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); }