Tests that Guard Against Changes to Your Software
POSTED Sunday, June 27, 2010Keywords: Testing, ColdBox, ColdFusion
Those who augment their development practice to include unit-testing--as I hope you have if you are following this series--can help insure they continue to embrace the discipline of 'test first' by saving their understanding of the software-under-test (SUT) within the actual test. This practice guards against you or another developer modifying the SUT without informing the test. For example, if someone adds a new property or function your test can alert you. This practice provides a little insurance to keep you honest to your promise to test first.
This practice can also check the implicit functions found within the SUT. Generally, I only check for the functions/methods I explicitly define within the SUT and ignore the implicit assessors provided by ColdFusion 9. But, the samples below can check for both if desired.

