Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.73 KB

readme.md

File metadata and controls

33 lines (26 loc) · 1.73 KB

Morgan Stanley Advent of TDD (Advent of Code 2023 solutions in TDD style)

This solution takes Test-Driven Design to heart:

  • tests are written first - even if they don't compile initially (because classes, methods, etc. do not exist yet)
  • non-test code is only written because either it fixes a failing test or as part of a refactor step
  • there are no main methods/entry points: even the solutions (for the AoC private/custom inputs) are generated as test cases (however the private inputs are not stored in this public repo because of this)

Some quick test stats (after day 25):
Number of tests: 1245
Code coverage: 98%<
Time to run tests: ~3.5 minutes
(as mentioned above these include even test cases that generate the actual solutions for the AoC inputs)

The full reports are also available: test report and test coverage report.

About the tech stack:

  • Kotlin 1.9.22
  • Kotest for testing
  • JVM 21
  • Gradle 8.5
  • Intellij 2023.3.2 with latest stable Kotlin and Kotest plugins

Kotest has a rich set of features including multiple different testing styles.
Different days sometimes use different styles because I was experimenting with them.
After a while I settled for the default style.
Also using Table-driven testing when running the same test with multiple data sets.