@Test public void testConfigure() { System.out.println("configure"); TestElement element = new JSONPathExtractor(); JSONPathExtractorGui instance = new JSONPathExtractorGui(); instance.configure(element); }
@Override public void configure(TestElement element) { super.configure(element); if (element instanceof JSONPathExtractor) { JSONPathExtractor extractor = (JSONPathExtractor) element; variableNameTextField.setText(extractor.getVar()); jsonPathTextField.setText(extractor.getJsonPath()); defaultValTextField.setText(extractor.getDefaultValue()); srcVariableName.setText(extractor.getSrcVariableName()); if (extractor.getSubject().equals(JSONPathExtractor.SUBJECT_VARIABLE)) { useVariable.setSelected(true); } else { useBody.setSelected(true); } Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(extractor.getInputFormat())) { btn.setSelected(true); } } } }
JSONPathExtractorGui extends AbstractPostProcessorGui { @Override public void configure(TestElement element) { super.configure(element); if (element instanceof JSONPathExtractor) { JSONPathExtractor extractor = (JSONPathExtractor) element; variableNameTextField.setText(extractor.getVar()); jsonPathTextField.setText(extractor.getJsonPath()); defaultValTextField.setText(extractor.getDefaultValue()); srcVariableName.setText(extractor.getSrcVariableName()); if (extractor.getSubject().equals(JSONPathExtractor.SUBJECT_VARIABLE)) { useVariable.setSelected(true); } else { useBody.setSelected(true); } Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(extractor.getInputFormat())) { btn.setSelected(true); } } } } }
JSONPathExtractorGui extends AbstractPostProcessorGui { @Override public void configure(TestElement element) { super.configure(element); if (element instanceof JSONPathExtractor) { JSONPathExtractor extractor = (JSONPathExtractor) element; variableNameTextField.setText(extractor.getVar()); jsonPathTextField.setText(extractor.getJsonPath()); defaultValTextField.setText(extractor.getDefaultValue()); srcVariableName.setText(extractor.getSrcVariableName()); if (extractor.getSubject().equals(JSONPathExtractor.SUBJECT_VARIABLE)) { useVariable.setSelected(true); } else { useBody.setSelected(true); } Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(extractor.getInputFormat())) { btn.setSelected(true); } } } } JSONPathExtractorGui(); }
JSONPathExtractorGui extends AbstractPostProcessorGui { @Override public void configure(TestElement element) { super.configure(element); if (element instanceof JSONPathExtractor) { JSONPathExtractor extractor = (JSONPathExtractor) element; variableNameTextField.setText(extractor.getVar()); jsonPathTextField.setText(extractor.getJsonPath()); defaultValTextField.setText(extractor.getDefaultValue()); srcVariableName.setText(extractor.getSrcVariableName()); if (extractor.getSubject().equals(JSONPathExtractor.SUBJECT_VARIABLE)) { useVariable.setSelected(true); } else { useBody.setSelected(true); } Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(extractor.getInputFormat())) { btn.setSelected(true); } } } } JSONPathExtractorGui(); @Override void clearGui(); @Override TestElement createTestElement(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void modifyTestElement(TestElement element); @Override void configure(TestElement element); }
JSONPathExtractorGui extends AbstractPostProcessorGui { @Override public void configure(TestElement element) { super.configure(element); if (element instanceof JSONPathExtractor) { JSONPathExtractor extractor = (JSONPathExtractor) element; variableNameTextField.setText(extractor.getVar()); jsonPathTextField.setText(extractor.getJsonPath()); defaultValTextField.setText(extractor.getDefaultValue()); srcVariableName.setText(extractor.getSrcVariableName()); if (extractor.getSubject().equals(JSONPathExtractor.SUBJECT_VARIABLE)) { useVariable.setSelected(true); } else { useBody.setSelected(true); } Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(extractor.getInputFormat())) { btn.setSelected(true); } } } } JSONPathExtractorGui(); @Override void clearGui(); @Override TestElement createTestElement(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void modifyTestElement(TestElement element); @Override void configure(TestElement element);  }