1 | void configure(TestElement element) {↵ | | 1 | void configure(TestElement element) {↵
|
2 | scriptField.setText(element.getPropertyAsString(BeanShellAssertion.SCRIPT));↵ | | 2 | scriptField.setText(element.getPropertyAsString(BeanShellSampler.SCRIPT));↵
|
3 | filename.setText(element.getPropertyAsString(BeanShellAssertion.FILENAME));↵ | | 3 | filename.setText(element.getPropertyAsString(BeanShellSampler.FILENAME));↵
|
4 | parameters.setText(element.getPropertyAsString(BeanShellAssertion.PARAMETERS));↵ | | 4 | parameters.setText(element.getPropertyAsString(BeanShellSampler.PARAMETERS));↵
|
5 | resetInterpreter.setSelected(element.getPropertyAsBoolean(BeanShellAssertion.RESET_INTERPRETER));↵ | | 5 | resetInterpreter.setSelected(element.getPropertyAsBoolean(BeanShellSampler.RESET_INTERPRETER));↵
|
6 | super.configure(element);↵ | | 6 | super.configure(element);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public TestElement createTestElement() {↵ | | 8 | public TestElement createTestElement() {↵
|
9 | BeanShellAssertion sampler = new BeanShellAssertion();↵ | | 9 | BeanShellSampler sampler = new BeanShellSampler();↵
|
10 | modifyTestElement(sampler);↵ | | 10 | modifyTestElement(sampler);↵
|
11 | return sampler;↵ | | 11 | return sampler;↵
|
12 | }↵ | | 12 | }↵
|
|
13 | /**↵ | | 13 | /**↵
|
14 | * Modifies a given TestElement to mirror the data in the gui components.↵ | | 14 | * Modifies a given TestElement to mirror the data in the gui components.↵
|
15 | * ↵ | | 15 | * ↵
|
16 | * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)↵ | | 16 | * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)↵
|
17 | */↵ | | 17 | */↵
|
18 | public void modifyTestElement(TestElement te) {↵ | | 18 | public void modifyTestElement(TestElement te) {↵
|
19 | te.clear();↵ | | 19 | te.clear();↵
|
20 | this.configureTestElement(te);↵ | | 20 | this.configureTestElement(te);↵
|
21 | te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText());↵ | | 21 | te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText());↵
|
22 | te.setProperty(BeanShellAssertion.FILENAME, filename.getText());↵ | | 22 | te.setProperty(BeanShellSampler.FILENAME, filename.getText());↵
|
23 | te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText());↵ | | 23 | te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText());↵
|
24 | te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));↵ | | 24 | te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));↵
|
25 | | | 25 |
|