Examples of XppDriver


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

* @see XppDriver
*/
public class XStreamXpp extends XStreamDriver {

    public XStreamXpp() {
        super(new XppDriver(), "XML with default XPP parser");
    }
View Full Code Here

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

        addDriverTest(new Dom4JDriver());
        addDriverTest(new DomDriver());
        addDriverTest(new JDomDriver());
        addDriverTest(new StaxDriver());
        addDriverTest(new XppDomDriver());
        addDriverTest(new XppDriver());
        addDriverTest(new XomDriver());
        if (JVM.is14()) {
            JVM jvm = new JVM();
            Class driverType = jvm.loadClass("com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver");
            try {
View Full Code Here

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

            // expected
        }
    }
   
    public void testWithUnderscore() {
        xstream = new XStream(new XppDriver(new XmlFriendlyNameCoder("_-", "_")));
        String xml = "" +
                "<X_alias>\n" +
                "  <anInt>0</anInt>\n" +
                "</X_alias>";
View Full Code Here

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

public class XStreamCompact implements Product {

    private final XStream xstream;

    public XStreamCompact() {
        this.xstream = new XStream(new XppDriver());
    }
View Full Code Here

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

    }

    public void testSerializesAllPrimitiveFieldsInACustomObject() {
        World world = new World();

        XStream xstream = new XStream(new XppDriver());
        xstream.alias("world", World.class);

        String expected =
                "<world>\n" +
                "  <anInt>1</anInt>\n" +
View Full Code Here

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

        String expected = "" +
                "<types>\n" +
                "  <normal>normal</normal>\n" +
                "</types>";

        XStream xstream = new XStream(new XppDriver());
        xstream.alias("types", TypesOfFields.class);

        String xml = xstream.toXML(fields);
        assertEquals(expected, xml);
View Full Code Here

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

        assertEquals(expected, xml);

    }
   
    public void testCanBeOverloadedToDeserializeTransientFields() {
        XStream xstream = new XStream(new XppDriver());
        xstream.alias("types", TypesOfFields.class);
        xstream.registerConverter(new ReflectionConverter(xstream.getMapper(), xstream
            .getReflectionProvider()) {

            public boolean canConvert(Class type) {
View Full Code Here

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

        TypesOfFields fields = (TypesOfFields)xstream.fromXML(xml);
        assertEquals("foo", fields.trans);
    }

    public void testCustomConverterCanBeInstantiatedAndRegisteredWithDesiredPriority() {
        XStream xstream = new XStream(new XppDriver());
        // using default mapper instead of XStream#buildMapper()
        Mapper mapper = new DefaultMapper(new CompositeClassLoader());
        // AttributeMapper required by ReflectionConverter
        mapper = new AttributeMapper(mapper, xstream.getConverterLookup(), xstream.getReflectionProvider());
        Converter converter = new CustomReflectionConverter(mapper, new PureJavaReflectionProvider());
View Full Code Here

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

            }
        }
        catch (Exception e) {
            throw new RuntimeException("Could not load driver: " + driver);
        }
        return new XppDriver();
    }
View Full Code Here

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

import com.thoughtworks.xstream.io.xml.XppDriver;

public class XStream11XmlFriendlyTest extends AbstractAcceptanceTest {

    protected XStream createXStream() {
        return new XStream(new XppDriver(new XStream11XmlFriendlyReplacer())) {

            protected boolean useXStream11XmlFriendlyMapper() {
                return true;
            }
           
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.