Archive
테스트가 코드를 향상시키도록 하라
epicdev
2011. 11. 15. 14:58
Writing unit tests often helps you write better code. The reason is simple: a test case is a user of your code. It's only when using code that you find its shortcomings. Don't hesitate to listen to your tests and refactor your code so that it's easier to use. The practice of test-driven development relies on this principle. By writing the tests first, you develop your classes from the point of view of a user of your code.
|