* the TestElement to configure
*/
@Override
public void configure(TestElement el) {
super.configure(el);
ResponseAssertion model = (ResponseAssertion) el;
showScopeSettings(model, true);
if (model.isContainsType()) {
containsBox.setSelected(true);
} else if (model.isEqualsType()) {
equalsBox.setSelected(true);
} else if (model.isSubstringType()) {
substringBox.setSelected(true);
} else {
matchesBox.setSelected(true);
}
notBox.setSelected(model.isNotType());
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);
}