Exemplo n.º 1
0
        public async Task IncreaseMaximumHealth(int mass)
        {
            Health health = await this.GetHealth();

            health.Maximum = HealthFormulas.CalculateMaximumHealth(mass);

            await this.context.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task IncreaseMaximumHealthShouldIncreaseCorrectlyBasedOnMass()
        {
            // Arrange
            int mass = 15;

            // Act
            await this.healthService.IncreaseMaximumHealth(mass);

            int expected = HealthFormulas.CalculateMaximumHealth(mass);

            // Assert
            Assert.Equal(expected, this.hero.Health.Maximum);
        }