public void AddRaceToUnknownHero_ThrowsException_Test() { // Arrange var addRaceMessage = RaceMessage.CreateAdd(_sequence.Next, Guid.NewGuid(), new[] { _humanRace }); // Act & Assert Assert.Throws<InvalidActionException>(() => _quest.AddMessage(_gameId, addRaceMessage)); }
public void AddClassToHeroTwice_ThrowsException_Test() { // Arrange var addClassMessage = ClassMessage.CreateAdd(_sequence.Next, _playerId, new[] { _warriorClass }); var addAnotherClassMessage = ClassMessage.CreateAdd(_sequence.Next, _playerId, new[] { _warriorClass }); // Act & Assert _quest.AddMessage(_gameId, addClassMessage); Assert.Throws<InvalidActionException>(() => _quest.AddMessage(_gameId, addAnotherClassMessage)); }