
a.Create a class (SampleInterview) that is a subtype of the Interview class.
The following code creates the SampleInterview class.
public class SampleInterview extends Interview {
....
}
b.Identify the new interview (SampleInterview) as a
In the new
The following code identifies SampleInterview as a
MidpTckBaseInterview.
public class SampleInterview extends Interview {
public SampleInterview(MidpTckBaseInterview parent) throws Fault {
super(parent, "sample");
}
c.(Optional) Identify the resource file and helpset file used by the sub- interview.
By default, a
The following code in the SampleInterview example specifies a different resource file and helpset file.
public class SampleInterview extends Interview { public SampleInterview(MidpTckBaseInterview parent)
throws Fault { super(parent, "sample"); setResourceBundle("i18n"); setHelpSet("help/sampleInterview");
}
}
In the example, "i18n" is the properties file updated in Step 4, and sampleInterview is the More Info helpset file updated in Step 5.
Chapter 3 Test Suite Construction 31