Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For writing tests, we prefer groovy Groovy and junit JUnit. Although groovy and junit is good enoughGroovy and JUnit are sufficient, we also use spock the Spock framework that as it brings a huge amount of very helpful features to the tests.

To get started:

  1. Clone the example project from

...

  1. https://bitbucket.org/pricefx/tdd4c-example-logic 

...

  1. Set up your IDE

...

  1. Open tdd4c/MyFirst1Test.groovy

...

  1. Run it.
    Image Modified


The test itself instantiates an instance of the TestRun class which is the tiny (test run) context holder that evaluates all the formulas and stores element results.

One When executed, one you can query the element results.

Infotip

Explore the other tests in the repository.