public void DamageCalled_WithInvalidValues_DamageMethodDoesNotThrow([Values(110, -10)] int damageValue) { var bee = new BeeBase(70); Assert.DoesNotThrow(() => { bee.Damage(damageValue); }); Assert.False(bee.IsDead); }
public void BeeHealthThreshold_SetCorrectlyWithinConstructor() { var healthThreshold = 42; var bee = new BeeBase(healthThreshold); Assert.AreEqual(healthThreshold, bee.HealthThreshold); }
public void DamageCalled_IfNotDead_BeeTakesCorrectDamage() { var bee = new BeeBase(70); bee.Damage(25); Assert.AreEqual((float)75, bee.Health); }
public void BeeHealthIsBelowThreshold_BeeIsDead() { var bee = new BeeBase(100); bee.Damage(1); Assert.True(bee.IsDead); }
public void DamageCalled_IfDead_DamageMethodDoesNotThrow() { var bee = new BeeBase(100); bee.Damage(1); Assert.True(bee.IsDead); Assert.DoesNotThrow(() => { bee.Damage(30); }); }
public void DamageCalled_IfDead_BeeTakesNoDamage() { var bee = new BeeBase(90); bee.Damage(11); bee.Damage(40); Assert.AreEqual((float)89, bee.Health); }
public void GenerateFestBeeSwarm(int beeNumber) { Transform swarmExit = m_SwarmExits[Random.Range(0, m_SwarmExits.Count)]; FestBeeSwarm swarm = Instantiate(m_BeeSwarmPrefab, swarmExit.position, Quaternion.identity); m_festbeeSwarmList.Add(swarm); for (int i = 0; i < beeNumber; i++) { BeeBase bee = Instantiate(m_BeePrefab, swarm.transform.position, Quaternion.identity); swarm.AddSwarmObject(bee); } }
public void BeeHealth_StartsAt100() { var bee = new BeeBase(70); Assert.AreEqual(100, bee.Health); }
public void BeeHealthIsAboveThreshold_BeeIsNotDead() { var bee = new BeeBase(70); Assert.False(bee.IsDead); }