Hi All, I need to write test cases for a functionality that I am adding related to Declining Interest Equal Principal Installment. The majority of changes will be in the business logic for loan, LoanBO.java. Since most of the tests are like functional test
My questions are: 1. Should I add my testing scenarios into the existing TestLoanBO.java or should they be seperate, or better question is, what is the general practice of writing test cases when adding functionality to existing requirements/feature. 2. There is a scenario where I am not sure of the implementation of the existing code how do I test this case? the scenario in question is because of a function called applyrounding (please see earlier email below). Basically if I configure the rounding rules as how I need them, I get the correct result. But if I dont apply any rounding and don't use grace functionality then this applyrounding() function uses some logic to change the values, which means my tests will not pass. So should the test account for all types of rounding configurations? Thanks Soham > -----Original Message----- > From: Soham Dhakal [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] > Sent: Friday, December 28, 2007 12:30 PM > To: 'Developer' > Subject: LoanBO.java - > Some questions about Business logic > ..... > > 2. Method applyRounding() > I am not sure what business rule this method is > implementing. It seems that the rounding of the amount > (interest, principal based on configuration ) is handled in money. > Furthermore the first thing it evalutes is > if (!isPricipalZeroInAnyInstallmemt()) { > This means that if a Loan product has principal only grace > (for 1 or more installments, which will make the princial 0 > for the grace installments) this code will not be executed. > Does this seem correct? > > > > > Thanks > Soham > > > > > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
