public async void basic_healthcheck_returns_ok() { var request = TestFactory.CreateHttpRequest(); var response = (OkObjectResult)await HealthFunction.Run(request, "basic", logger); Assert.Equal("healthy", response.Value); }
public void FullHealing() { int testMaxHealth = 3; HealthFunction healthFunction = new HealthFunction(testMaxHealth); healthFunction.FullHeal(); Assert.AreEqual(testMaxHealth, healthFunction.current); }
public void MinusDamageHealth() { int testMaxHealth = 3; HealthFunction healthFunction = new HealthFunction(testMaxHealth); healthFunction.FullHeal(); healthFunction.TakingDamage(-1); Assert.AreEqual(testMaxHealth, healthFunction.current); }
public void MinusHealing() { int testMaxHealth = 3; HealthFunction healthFunction = new HealthFunction(testMaxHealth); healthFunction.FullHeal(); bool canheal = healthFunction.Healing(-1); Assert.AreEqual(testMaxHealth, healthFunction.current); Assert.AreEqual(false, canheal); }
public void OverHealing() { int testMaxHealth = 3; int startHealth = 1; int healingAmount = 5; HealthFunction healthFunction = new HealthFunction(testMaxHealth); healthFunction.current = startHealth; healthFunction.Healing(healingAmount); Assert.AreEqual(testMaxHealth, healthFunction.current); }
private void Awake() => HealthFunction = new HealthFunction(setMaxHealth);