Euro 2020 draw simulator - TDD practice
Qualifiers for Euro 2020 draw simulator - TDD and BDD practice
Implement draw algorithm using TDD/BDD technique of software development.
Complete application should allow simulate draw procedure.
Behavior-driven development (BDD) is a software development methodology in which an application is specified
and designed by describing how its behavior should appear to an outside observer.
TDD and BDD is that they are not testing techniques. They are about improving the design process.
Test framework where very easy is to use domain-specific language (DSL) with natural language constructs.
when: "the simulation is running according to procedure"
facade.run()
then: "every group should be full (according group capacity)"
configuration.getGroupRepository().findAll().each { assert !it.hasFreePlaces() }
In story, test and code is used the same ubiquitous language. Domain code is distilled and independent from
the rest of system.
Ports and adapters: PotRepository as port and InMemoryPotRepository as in-memory adapter outside domain.
Regulations source: https://www.uefa.com/MultimediaFiles/Download/uefaorg/General/02/57/32/05/2573205_DOWNLOAD.pdf