agtors / agar.core

Actor core system for simple Agar implementation
Apache License 2.0
2 stars 0 forks source link

Normalise tests #24

Closed d-plaindoux closed 6 years ago

d-plaindoux commented 6 years ago

This PR normalise tests replacing flat spec style be grouped specs style.

Therefor Behavior tests (for instance) has the following form:

class BehaviorsSpec() extends WordSpec with Matchers {

  val MAX_VELOCITY = 3:Short

  "An entity" should {
    "move toward the target with steer behavior" in {
      ...
    }

    "run away from the target with flee behavior" in {
      ...
    }

    "be able to pursuit a target" in {
     ...
    }

    "be evade from a pursuer" in {
      ...
    }
  }
}

Then tests outputs are:

[info] BehaviorsSpec:
[info] An entity
[info] - should move toward the target with steer behavior
[info] - should run away from the target with flee behavior
[info] - should be able to pursuit a target
[info] - should be evade from a pursuer
NotBad4U commented 6 years ago

This is perfect thank you !