Skip to main content
added link for those who don't know what the LoD is
Source Link

When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?

When writing tests I often break the Law of DemeterLaw of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functional.

When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?

When writing tests I often break the Law of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functional.

When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?

When writing tests I often break the Law of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functional.

Improved grammar a little bit, made the question easier to read.
Source Link

Is it worth to spend time whenWhen writing unit tests in order that, is it worth spending the extra time to make the code written there hashave good quality and is very easy to readreadability?

When writing this kinds of tests I break very often break the Law of Demeter, for faster writing and notto avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functionalyfunctional.

Is it worth to spend time when writing unit tests in order that the code written there has good quality and is very easy to read?

When writing this kinds of tests I break very often the Law of Demeter, for faster writing and not using so many variables. Technically, unit tests are not reused directly - are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functionaly.

When writing unit tests, is it worth spending the extra time to make the code have good quality and readability?

When writing tests I often break the Law of Demeter, for faster writing and to avoid using so many variables. Technically, unit tests are not reused directly - they are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functional.

Tweeted twitter.com/#!/StackProgrammer/status/217929030807191552
Source Link
Random42
  • 10.5k
  • 10
  • 52
  • 65

Quality of Code in unit tests?

Is it worth to spend time when writing unit tests in order that the code written there has good quality and is very easy to read?

When writing this kinds of tests I break very often the Law of Demeter, for faster writing and not using so many variables. Technically, unit tests are not reused directly - are strictly bound to the code so I do not see any reason for spending much time on them; they only need to be functionaly.