The document discusses the benefits of unit testing over manual testing, including reduced time spent on manual tests, protection against regressions, executable documentation, and less coupled code design. It provides examples of what unit tests look like using an "arrange, act, assert" structure. It also discusses test-driven development and transforming code to be more testable through practices like removing conditionals and replacing constants with variables. The document advocates for unit testing but notes there is no "silver bullet" and tests can diminish value if not implemented properly.
39. • ({ }–>nil) no code at all->code that employs nil
• (nil->constant)
• (constant->constant+) a simple constant to a more complex constant
• (constant->scalar) replacing a constant with a variable or an argument
• (statement->statements) adding more unconditional statements.
• (unconditional->if) splitting the execution path
• (scalar->array)
• (array->container)
• (statement->recursion)
• (if->while)
• (expression->function) replacing an expression with a function or algorithm
• (variable->assignment) replacing the value of a variable.
https://8thlight.com/blog/uncle-bob/2013/05/27/TheTransformationPriorityPremise.html