public void SaveExceptionThrow() { // Arrange var adventurer = new Adventurer() { Name = String.Empty }; // Act adventurer.Save(); }
public void SaveExceptionMessage() { // Arrange var adventurer = new Adventurer() { Name = String.Empty }; var expected = "You must assign a name for the Adventurer before calling the Save() method."; // Act try { adventurer.Save(); } catch (MissingMemberException exc) { // Assert Assert.AreEqual(expected, exc.Message); } }