Seeking better testing language

Thanks for the feedback. I pasted the snippet about the test and mistyped the includes by mistake with hopes I would not have to explain why they were defined in the first place. Yet here I am again explaining them for other reasons. I was hoping someone would point out the flaws in my test(s) so I can learn from my mistake(s), but I guess not.

Thank you jurs for at least giving me a different way of doing things, I will start testing immediately.

Edit - @jurs, can you explain the purpose of using the NOT operator? I see that it is used in many places throughout the example sketches I've been through and never understood why it is important to ask in code if something is NOT, when the code never told it to be? Or why is the code testing to see if the light was turned on before the mention of the command to turn it on?

TYIA