public void HealingShouldIncreaseHealth() { var game = GameMocks.TwoPlayersOneDamaged(); var processor = CreateProcessor(game); var result = (PlayerHealedEvent)processor.Process(new HealingEvent(2, 2)); Assert.Equal(2, result.PlayerId); Assert.InRange(result.Health, 600, 700); Assert.Equal(string.Format(Constants.Messages.HealedTemplate, 2, 2), result.Message); }
public void KillingShouldProduceCorrectMessage() { var game = GameMocks.TwoPlayersOneDamaged(); var processor = CreateProcessor(game); var result = (PlayerDamagedEvent)processor.Process(new AttackEvent(1, 2)); Assert.Equal(0, result.Health); Assert.Equal(string.Format(Constants.Messages.AttackedTemplate, 1, 2) + " " + string.Format(Constants.Messages.KilledTemplate, 2), result.Message); }