Skip to main content
2 of 4
added 77 characters in body
CodeART
  • 4.1k
  • 1
  • 23
  • 23

You should be writing unit tests only for logical code. Definition of logical code is below:

Logical code is any piece of code that has some sort of logic in it, small as it may be. It’s logical code if it has one or more of the following: an IF statement, a loop, switch or case statements, calculations, or any other type of decision-making code.

Reference: Art of Unit Testing

More information here: http://www.manning.com/osherove/SampleChapter1.pdf

CodeART
  • 4.1k
  • 1
  • 23
  • 23