On Fri, 02 Sep 2011 14:16:30 +0530, anirban adhikary wrote: > Hi I have write the following code and Now I have been asked to write a > unit test case for this code. But neither I haveĀ any idea how to write > a unit test case nor I have ever experience with it. So in this case I > am asking your help.
[Snip program that deletes old records from a database] If someone used the words "unit test" in a request to you then they likely have an existing testing environment and expectations of how tests should behave and what scope they have. Or is this the first unit test that the person asking you will have? So find out what "unit test" means to them, because there are many possibilities. Assuming they used the term in its usual sense, this test would be one unit out of many others, so what do those other tests do, what protocols do they follow, where do they send their results? Without knowing those things any well-meaning answers you could get here would probably lead you in the wrong direction. Tell us what you find out. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/certificates/perl-programming.php -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/