/** {@inheritDoc} */
@Override
public void configure(TestElement el)
{
super.configure(el);
JUnitSampler sampler = (JUnitSampler)el;
junit4.setSelected(sampler.getJunit4());
filterpkg.setText(sampler.getFilterString());
classnameCombo.setSelectedItem(sampler.getClassname());
setupMethods();
methodName.setSelectedItem(sampler.getMethod());
constructorLabel.setText(sampler.getConstructorString());
if (sampler.getSuccessCode().length() > 0) {
successCode.setText(sampler.getSuccessCode());
} else {
successCode.setText(JMeterUtils.getResString("junit_success_default_code")); //$NON-NLS-1$
}
if (sampler.getSuccess().length() > 0) {
successMsg.setText(sampler.getSuccess());
} else {
successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); //$NON-NLS-1$
}
if (sampler.getFailureCode().length() > 0) {
failureCode.setText(sampler.getFailureCode());
} else {
failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$
}
if (sampler.getFailure().length() > 0) {
failureMsg.setText(sampler.getFailure());
} else {
failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$
}
if (sampler.getError().length() > 0) {
errorMsg.setText(sampler.getError());
} else {
errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); //$NON-NLS-1$
}
if (sampler.getErrorCode().length() > 0) {
errorCode.setText(sampler.getErrorCode());
} else {
errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); //$NON-NLS-1$
}
doSetup.setSelected(sampler.getDoNotSetUpTearDown());
appendError.setSelected(sampler.getAppendError());
appendExc.setSelected(sampler.getAppendException());
createInstancePerSample.setSelected(sampler.getCreateOneInstancePerSample());
}