@Test public void testInit() { System.out.println("init"); JSONPathAssertionGui instance = new JSONPathAssertionGui(); instance.init(); instance.stateChanged(null); }
public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); } }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); } JSONPathAssertionGui(); }
JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); } 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 { public void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH); VerticalPanel panel = new VerticalPanel(); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); JPanel groupPanel = new HorizontalPanel(); inputJSON.setActionCommand(JSONPathAssertion.INPUT_JSON); inputYAML.setActionCommand(JSONPathAssertion.INPUT_YAML); inputFormatGroup.add(inputJSON); inputFormatGroup.add(inputYAML); groupPanel.add(inputJSON); groupPanel.add(inputYAML); JPanel inputFormatPanel = new HorizontalPanel(); inputFormatPanel.add(new JLabel("Input Format: ")); inputFormatPanel.add(groupPanel); jsonPath = new JLabeledTextField("Assert JSON Path exists: "); jsonValidation = new JCheckBox("Additionally assert value"); isRegex = new JCheckBox("Match as regular expression"); jsonValue = new JLabeledTextArea("Expected Value: "); expectNull = new JCheckBox("Expect null"); invert = new JCheckBox("Invert assertion (will fail if above conditions met)"); jsonValidation.addChangeListener(this); expectNull.addChangeListener(this); panel.add(inputFormatPanel); panel.add(jsonPath); panel.add(jsonValidation); panel.add(isRegex); panel.add(jsonValue); panel.add(expectNull); panel.add(invert); add(panel, BorderLayout.CENTER); } 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);  }