I downloaded and have been playing with CFUnit as unit tests have always been 
one of those things I should do but never got around to.  I read through the 
primer document and it looks simple and straight-forward ... of course, so is 
the example.   Basic examples are nice, but sometimes they are too basic. 

So, I go to write a unit test around a simple bean object.  First test, 
setName(name) .... Okay, obviously I need to pass in a string to this method, 
but as it is a setter, it does not return anything.  So, what am I really 
testing here ... that the method does not blow up, or how would I really test 
that it is doing what it is supposed to?  Do I actually test the setName 
function by calling getName afterwards (in the same test function) and then 
comparing the expected result?

Any expert advice out there?

Thanks
-- Jeff 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224705
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to