
Originally Posted by
Class ATest
import junit.framework.*;
public class ATest extends TestCase{
// Define All the Objects to be Tested
private A a = new A();
// Populate all the Objects needed to be Tested
protected void setUp(){
// Populate the Objects need for Test.The Population can be done using the properties
// File
}
public void testOpn(){
//
String inputData = "Vicky"; // 1) Advisor(InputDataAdvisor) should prepare the InputData Object
String expectedValue = "VICKY"; // 2) Advisor(ExpectedResultAdvisor) will prepare the ExpectedValue Object
String executionValue = a.opn(inputData);
assertEquals(expectedValue, executionValue); // 3)Advisor will check the object Contents.Its Data
}
public static void main(String args[]) {
junit.textui.TestRunner.run(ATest.class);
}
}