TDD perusteet 102
Last updated
Last updated
-harjoituksissa esiteltiin merkkijonolaskimen tehtävänanto. Tee harjoitus uudelleen mutta nyt pidättäydy mahdollisimman tarkasti TDD:n kolmessa säännössä. Säännöt alkuperäisessä muodossaan on lueteltu alla.
Uncle Bob describes TDD with three rules:
You are not allowed to write any production code unless it is to make a failing unit test pass.
You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
-harjoituksissa esiteltiin keilapistelaskurin logiikka. Tee harjoitus uudelleen mutta käytä nyt aiemmin oppimaasi hyödyksi. Tunnet toivottavasti ongelman jo paremmin. Ratkaise ongelma noudattaen TDD:n kolmea sääntöä ja pyri ohjelmoimaan pienissä välivaiheissa.