@Test public void testSample() { System.out.println("sample"); Entry e = null; JSONToXMLConverter instance = new JSONToXMLConverter(); SampleResult expResult = null; SampleResult result = instance.sample(e); }
@Override public SampleResult sample(Entry e) { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); result.setSamplerData(this.getJsonInput()); result.setDataType(SampleResult.TEXT); result.sampleStart(); if (!getJsonInput().equalsIgnoreCase("")) { try { this.convertToXML(); result.setResponseData(this.getXmlOutput().getBytes()); result.setSuccessful(true); } catch (Exception e1) { result.setResponseData(e1.getMessage().getBytes()); result.setSuccessful(false); } } result.sampleEnd(); return result; }
JSONToXMLConverter extends AbstractSampler { @Override public SampleResult sample(Entry e) { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); result.setSamplerData(this.getJsonInput()); result.setDataType(SampleResult.TEXT); result.sampleStart(); if (!getJsonInput().equalsIgnoreCase("")) { try { this.convertToXML(); result.setResponseData(this.getXmlOutput().getBytes()); result.setSuccessful(true); } catch (Exception e1) { result.setResponseData(e1.getMessage().getBytes()); result.setSuccessful(false); } } result.sampleEnd(); return result; } }
JSONToXMLConverter extends AbstractSampler { @Override public SampleResult sample(Entry e) { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); result.setSamplerData(this.getJsonInput()); result.setDataType(SampleResult.TEXT); result.sampleStart(); if (!getJsonInput().equalsIgnoreCase("")) { try { this.convertToXML(); result.setResponseData(this.getXmlOutput().getBytes()); result.setSuccessful(true); } catch (Exception e1) { result.setResponseData(e1.getMessage().getBytes()); result.setSuccessful(false); } } result.sampleEnd(); return result; } JSONToXMLConverter(); }
JSONToXMLConverter extends AbstractSampler { @Override public SampleResult sample(Entry e) { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); result.setSamplerData(this.getJsonInput()); result.setDataType(SampleResult.TEXT); result.sampleStart(); if (!getJsonInput().equalsIgnoreCase("")) { try { this.convertToXML(); result.setResponseData(this.getXmlOutput().getBytes()); result.setSuccessful(true); } catch (Exception e1) { result.setResponseData(e1.getMessage().getBytes()); result.setSuccessful(false); } } result.sampleEnd(); return result; } JSONToXMLConverter(); void setJsonInput(String jsonInput); String getJsonInput(); void setXmlOutput(String xmlOutput); String getXmlOutput(); @Override SampleResult sample(Entry e); }
JSONToXMLConverter extends AbstractSampler { @Override public SampleResult sample(Entry e) { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); result.setSamplerData(this.getJsonInput()); result.setDataType(SampleResult.TEXT); result.sampleStart(); if (!getJsonInput().equalsIgnoreCase("")) { try { this.convertToXML(); result.setResponseData(this.getXmlOutput().getBytes()); result.setSuccessful(true); } catch (Exception e1) { result.setResponseData(e1.getMessage().getBytes()); result.setSuccessful(false); } } result.sampleEnd(); return result; } JSONToXMLConverter(); void setJsonInput(String jsonInput); String getJsonInput(); void setXmlOutput(String xmlOutput); String getXmlOutput(); @Override SampleResult sample(Entry e);  }