* @param el
* the TestElement to configure
*/
public void configure(TestElement el) {
super.configure(el);
ResponseAssertion model = (ResponseAssertion) el;
if (model.isContainsType()) {
containsBox.setSelected(true);
matchesBox.setSelected(false);
equalsBox.setSelected(false);
} else if (model.isEqualsType()) {
containsBox.setSelected(false);
matchesBox.setSelected(false);
equalsBox.setSelected(true);
} else {
containsBox.setSelected(false);
matchesBox.setSelected(true);
equalsBox.setSelected(false);
}
if (model.isNotType()) {
notBox.setSelected(true);
} else {
notBox.setSelected(false);
}
if (model.isTestFieldResponseData()) {
responseStringButton.setSelected(true);
} else if (model.isTestFieldResponseCode()) {
responseCodeButton.setSelected(true);
} else if (model.isTestFieldResponseMessage()) {
responseMessageButton.setSelected(true);
} else if (model.isTestFieldResponseHeaders()) {
responseHeadersButton.setSelected(true);
} else // Assume it is the URL
{
urlButton.setSelected(true);
}
assumeSuccess.setSelected(model.getAssumeSuccess());
tableModel.clearData();
PropertyIterator tests = model.getTestStrings().iterator();
while (tests.hasNext()) {
tableModel.addRow(new Object[] { tests.next().getStringValue() });
}
if (model.getTestStrings().size() == 0) {
deletePattern.setEnabled(false);
} else {
deletePattern.setEnabled(true);
}