@Test public void testConfigure() { System.out.println("configure"); TestElement element = new JSONPathAssertion(); JSONPathAssertionGui instance = new JSONPathAssertionGui(); instance.configure(element); }
@Override public void configure(TestElement element) { super.configure(element); JSONPathAssertion jpAssertion = (JSONPathAssertion) element; jsonPath.setText(jpAssertion.getJsonPath()); jsonValue.setText(jpAssertion.getExpectedValue()); jsonValidation.setSelected(jpAssertion.isJsonValidationBool()); expectNull.setSelected(jpAssertion.isExpectNull()); invert.setSelected(jpAssertion.isInvert()); isRegex.setSelected(jpAssertion.isUseRegex()); Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(jpAssertion.getInputFormat())) { btn.setSelected(true); } } }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { @Override public void configure(TestElement element) { super.configure(element); JSONPathAssertion jpAssertion = (JSONPathAssertion) element; jsonPath.setText(jpAssertion.getJsonPath()); jsonValue.setText(jpAssertion.getExpectedValue()); jsonValidation.setSelected(jpAssertion.isJsonValidationBool()); expectNull.setSelected(jpAssertion.isExpectNull()); invert.setSelected(jpAssertion.isInvert()); isRegex.setSelected(jpAssertion.isUseRegex()); Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(jpAssertion.getInputFormat())) { btn.setSelected(true); } } } }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { @Override public void configure(TestElement element) { super.configure(element); JSONPathAssertion jpAssertion = (JSONPathAssertion) element; jsonPath.setText(jpAssertion.getJsonPath()); jsonValue.setText(jpAssertion.getExpectedValue()); jsonValidation.setSelected(jpAssertion.isJsonValidationBool()); expectNull.setSelected(jpAssertion.isExpectNull()); invert.setSelected(jpAssertion.isInvert()); isRegex.setSelected(jpAssertion.isUseRegex()); Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(jpAssertion.getInputFormat())) { btn.setSelected(true); } } } JSONPathAssertionGui(); }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { @Override public void configure(TestElement element) { super.configure(element); JSONPathAssertion jpAssertion = (JSONPathAssertion) element; jsonPath.setText(jpAssertion.getJsonPath()); jsonValue.setText(jpAssertion.getExpectedValue()); jsonValidation.setSelected(jpAssertion.isJsonValidationBool()); expectNull.setSelected(jpAssertion.isExpectNull()); invert.setSelected(jpAssertion.isInvert()); isRegex.setSelected(jpAssertion.isUseRegex()); Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(jpAssertion.getInputFormat())) { btn.setSelected(true); } } } JSONPathAssertionGui(); void init(); @Override void clearGui(); @Override TestElement createTestElement(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void modifyTestElement(TestElement element); @Override void configure(TestElement element); @Override void stateChanged(ChangeEvent e); }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { @Override public void configure(TestElement element) { super.configure(element); JSONPathAssertion jpAssertion = (JSONPathAssertion) element; jsonPath.setText(jpAssertion.getJsonPath()); jsonValue.setText(jpAssertion.getExpectedValue()); jsonValidation.setSelected(jpAssertion.isJsonValidationBool()); expectNull.setSelected(jpAssertion.isExpectNull()); invert.setSelected(jpAssertion.isInvert()); isRegex.setSelected(jpAssertion.isUseRegex()); Enumeration<AbstractButton> it = inputFormatGroup.getElements(); while (it.hasMoreElements()) { AbstractButton btn = it.nextElement(); if (btn.getActionCommand().equals(jpAssertion.getInputFormat())) { btn.setSelected(true); } } } JSONPathAssertionGui(); void init(); @Override void clearGui(); @Override TestElement createTestElement(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void modifyTestElement(TestElement element); @Override void configure(TestElement element); @Override void stateChanged(ChangeEvent e);  }