Does TDD mean not thinking about class design?

前端 未结 8 1850
生来不讨喜
生来不讨喜 2021-02-06 01:17

I am making a role playing game for fun and attempting to use TDD while developing it. Many of the TDD examples I see focus on creating the test first, then creating objects tha

8条回答
  •  悲哀的现实
    2021-02-06 01:55

    TDD is about design! So doing TDD you will be sure that your design is completely testable.

    Also, the "balanced approach" is the way to go IMO. You already know a high level architecture and TDD will drive this architecture to be testable.

    EDIT: Although, if you want just to practice TDD I would not do the "balanced approach". I would just do TDD with "baby steps" and maybe coding Dojos

提交回复
热议问题