Does TDD mean not thinking about class design?

前端 未结 8 1974
生来不讨喜
生来不讨喜 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:49

    Should my class design really come out of continually refining my tests?

    Yes.

    Does TDD mean not thinking about class design?

    Absolutely not. It means thinking about class design in the course of writing your tests, and the rest of your code. Class design is at play throughout the Red-Green-Refactor TDD life cycle.

提交回复
热议问题