Examples of XppDriver


Examples of com.thoughtworks.xstream.io.xml.XppDriver

    public synchronized static void saveSampleResult(SampleEvent evt, Writer writer) throws IOException {
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(SAMPLE_EVENT_OBJECT, evt);
        // This is effectively the same as saver.toXML(Object, Writer) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.marshal(evt.getResult(), new XppDriver().createWriter(writer), dh);
        writer.write('\n');
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

        InputStreamReader inputStreamReader = getInputStreamReader(reader);
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); // Allow TestResultWrapper to feed back the samples
        // This is effectively the same as saver.fromXML(InputStream) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.unmarshal(new XppDriver().createReader(reader), null, dh);
        inputStreamReader.close();
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

        assertNotNull(serialized);
        return serialized;
    }

    protected Object serializeWithXStream(Object toSerialize) {
        final XStream xstream = new XStream(new XppDriver());
        final String xml = xstream.toXML(toSerialize);
        Object serialized = xstream.fromXML(xml);
        assertNotNull(serialized);
        return serialized;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

        assertNotNull(serialized);
        return serialized;
    }

    protected Object serializeWithXStreamAndPureReflection(Object toSerialize) {
        final XStream xstream = new XStream(new PureJavaReflectionProvider(), new XppDriver());
        final String xml = xstream.toXML(toSerialize);
        Object serialized = xstream.fromXML(xml);
        assertNotNull(serialized);
        return serialized;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

    /*
     * create a driver that wires into a standard driver, and updates the stack
     * position.
     */
    driver = new StackDriver(new XppDriver(), writerStack, configuration.getNameSpaces());
    /*
     * Create an interface class mapper that understands class hierarchy for
     * single items
     */
    for (XStreamConfiguration.ConverterSet c : MAPPER_SCOPES) {
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

public class XStreamFactory
{
  public static XStream createXStream()
  {
   
    XStream xstream = new XStream(new XppDriver());

   
     xstream.registerConverter(new CalendarConverter(), XStream.PRIORITY_VERY_HIGH);
    
     try
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

    public synchronized static void saveSampleResult(SampleEvent evt, Writer writer) throws IOException {
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(SAMPLE_EVENT_OBJECT, evt);
        // This is effectively the same as saver.toXML(Object, Writer) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.marshal(evt.getResult(), new XppDriver().createWriter(writer), dh);
        writer.write('\n');
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

        InputStreamReader inputStreamReader = getInputStreamReader(reader);
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); // Allow TestResultWrapper to feed back the samples
        // This is effectively the same as saver.fromXML(InputStream) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.unmarshal(new XppDriver().createReader(reader), null, dh);
        inputStreamReader.close();
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

    public synchronized static void saveSampleResult(SampleEvent evt, Writer writer) throws IOException {
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(SAMPLE_EVENT_OBJECT, evt);
        // This is effectively the same as saver.toXML(Object, Writer) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.marshal(evt.getResult(), new XppDriver().createWriter(writer), dh);
        writer.write('\n');
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.XppDriver

        InputStreamReader inputStreamReader = getInputStreamReader(reader);
        DataHolder dh = JTLSAVER.newDataHolder();
        dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); // Allow TestResultWrapper to feed back the samples
        // This is effectively the same as saver.fromXML(InputStream) except we get to provide the DataHolder
        // Don't know why there is no method for this in the XStream class
        JTLSAVER.unmarshal(new XppDriver().createReader(reader), null, dh);
        inputStreamReader.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.