RE: [coldbox:17549] Verifying variable set inside tested object?

I don’t typically write unit tests for getters/setters (I actually use generic getters/setters) but if I did, I would probably just use the getter to see if the setter worked. I realize that may not be pure unit testing, but from an external perspective-- the important thing is that my getter correctly changed the state of the object as evidenced by the fact that I can now get the new value out.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Unless you’ve overloaded a getter / setter, there’s really no reason to write a test for it. I mean, it’s core to the underlying application engine - which isn’t something you should be unit testing. If it doesn’t work correctly, you’ll know it right away.