I have a program that is represented by a class : LoanApprovalSystem()
. This class contains some methods e.g. getamount(), getrisklevel(), getapprove()
etc.
Now I need to return these methods including the object of the class LoanApprovalSystem()
from another class.
Suppose I have created object of this class LoanApprovalSystem LS = new LoanApprovalSystem();
Iknow to call a method I should use the object like: LS.getamount()
or LS.getrisklevel()
? But what if I want to return both the method name and the object together??
Actually I need to generate test cases for my system. The test case should be like:
LS.receive(100000);
assertEquals(100000,LS.getamount());
To generate the test cases I need to call the methods including the object (LS.receive(100000)
or LS.getamount()
). My question is there any technique by which I can return the required method names and also its associated object ?
Aucun commentaire:
Enregistrer un commentaire