private void init() throws Fault { setResourceBundle("i18n"); setHelpSet("help/sampleInterview");

first = new StringQuestion(this, "hello"); first.setExporter(

Exporters.getStringValueExporter("sample.string.value"));

first.linkTo(qFeatureSupport);

setFirstQuestion(first);

}

//This is the added question: Does the implementation support the feature ? private YesNoQuestion qFeatureSupport = new YesNoQuestion(this,

"featureSupport") { public void clear() {

setValue(YesNoQuestion.NO);

}

protected void export(Map data) {

boolean b = (value == YES); data.put("isFeatureSupported", String.valueOf(b));

}

protected Question getNext() { return end;

}

};

private StringQuestion first;

private final FinalQuestion end = new FinalQuestion(this, "end");

}

3.Add interview question .smry and .text entries to the .properties file.

For each added interview question, the developer must create corresponding

.smry and .text entries in the resource file (.properties). The following is an example of the .smry and .text entries added for the new question.

SampleInterview.featureSupport.smry = Feature Support SampleInterview.featureSupport.text = Does your system support the feature ... ?

The .smry and .text entries contain elements used to perform the following functions:

SampleInterview.featureSupport is a unique question key that the Configuration Editor uses to identify the required question and its corresponding More Info topic.

Chapter 4 Writing Tests 75

Page 95
Image 95
Sun Microsystems 1.2 manual Writing Tests