S
S
s2019-07-24 19:40:15
Java
s, 2019-07-24 19:40:15

Is it worth checking for null in each module during testing?

Does every module need to check for null before executing anything?
I recently started doing unit tests, and as I understand it, with this type of testing, each tested method must be perceived as an independent module with the prospect of multiple uses.
In my project, as in any other, there is a chain of calls with the transfer of certain parameters for different processing. At one of the stages, there is a check for null. In other classes, parameters are being processed, but without checking.
Whether it is necessary to add check everywhere in this case?
Thank you for your time

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question