public void RemainsFullAfterPositiveChange(int maxHealth, int positiveChange) { WormyHealth wormyHealth = new WormyHealth(maxHealth); wormyHealth.ChangeHealth(positiveChange); Assert.AreEqual(maxHealth, wormyHealth.Health); }
public void IsZeroAfterGreaterNegativeChange(int maxHealth, int negativeChange) { WormyHealth wormyHealth = new WormyHealth(maxHealth); wormyHealth.ChangeHealth(negativeChange); Assert.AreEqual(0, wormyHealth.Health); }
public void IsDecreasedAfterNegativeChange(int maxHealth, int negativeChange) { WormyHealth wormyHealth = new WormyHealth(maxHealth); wormyHealth.ChangeHealth(negativeChange); Assert.AreEqual(maxHealth + negativeChange, wormyHealth.Health); }
public void IsFullAfterNegativeAndGreaterPositiveChange(int maxHealth, int negativeChange, int greaterPositiveChange) { WormyHealth wormyHealth = new WormyHealth(maxHealth); wormyHealth.ChangeHealth(negativeChange); wormyHealth.ChangeHealth(greaterPositiveChange); Assert.AreEqual(maxHealth, wormyHealth.Health); }
public void IsIncreasedAfterNegativeAndLesserPositiveChange(int maxHealth, int negativeChange, int lesserPositiveChange) { WormyHealth wormyHealth = new WormyHealth(maxHealth); wormyHealth.ChangeHealth(negativeChange); wormyHealth.ChangeHealth(lesserPositiveChange); Assert.AreEqual(maxHealth + negativeChange + lesserPositiveChange, wormyHealth.Health); }
private void Start() { wormyHealth = GetComponent <WormyHealth>(); ren = GetComponent <SpriteRenderer>(); }
public void IsFullAfterCreation(int maxHealth) { WormyHealth wormyHealth = new WormyHealth(maxHealth); Assert.AreEqual(maxHealth, wormyHealth.Health); }