During the test-based development process, I got used to writing the first unit test for the new part of the functionality first, and then writing the code for this function. If I have additional tests for writing to cover all the scripts, I usually write them after writing the code. Is this considered a bad form? Should I first try to write all conceivable tests for a piece of functionality before writing this code?
To correctly execute TDD, you always write the test first, and then the second functionality.
, , 20 , 20 . , / , . , TDD, , /.
, " ". "":
, . Interfaces. :
, . , . , , , , .
. , , , ( , ). powererd Mercurial MQ.
TDD / . :
, , .
, . , , , . , " ". , , , , .
, -, , .
, , , . , . , , . , , .
, , , , , ... , , .
, , , , , "TDD Video"
http://agilesoftwaredevelopment.com/videos/test-driven-development-basic-tutorial (oops, , )
- . , , . , , , .
, , - , , . , , . , , .
, TDD. (, , ) , , , , , re test-driving. .
TDD . , , - . , , . , .
TDD . , , , . - , , , : ", ", , , , , , .
red-green-refactor: , ( "", , ), , ( "" ), , , ( "" ). , , , . , / .
, , , . , , , , .
, , : . () .
TDD , , , . .
TDD, . - . ( ), , , , , , ( , ), . , .
1 .. , . , , , .
If you need to write a lot of tests for one unit of code (method, function, etc.), this may be a sign that you are trying to do too much on this device ... which, in turn, makes the dificult block for testing and refactoring at a later time.
Source: https://habr.com/ru/post/1720188/More articles:asp http post reading data - c #How to use an IF statement in a loop using StringTemplate - c #WEBBrowser Control; Is it possible to save Webbrowser content in SQL DB? - c #Starting a service from the MSI installer, which depends on the assemblies installed in msi - windows-vistavalueForKey returns only the memory address, not the value - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1720189/how-closely-aligned-is-the-repository-patten-with-either-unit-of-work-or-activerecord&usg=ALkJrhj_G2mDGv-ph28H3L_gGAZcaNrVMAHas anyone used any AOP products in Mono? - aopThere is === in jquery - javascriptreturns column values as IEnumerable - yieldget client computer timezone in asp.net mvc - javascriptAll Articles