Package com.thoughtworks.acceptance.objects

Examples of com.thoughtworks.acceptance.objects.OpenSourceSoftware


    public void testWithValueInSuperclass() {
        converterLookup.registerConverter(new ToAttributedValueConverter(
            OpenSourceSoftware.class, mapper, reflectionProvider, converterLookup, "name",
            Software.class), 0);

        final Software software = new OpenSourceSoftware("Codehaus", "XStream", "BSD");
        final StringWriter writer = new StringWriter();
        final CompactWriter compactWriter = new CompactWriter(writer);
        new TreeMarshaller(compactWriter, converterLookup, mapper).start(software, null);
        compactWriter.flush();
        assertEquals(
View Full Code Here


                OpenSourceSoftware.class, mapper, reflectionProvider, converterLookup,
                "license"), 0);

        final Software[] software = new Software[]{
            new Software("Microsoft", "Windows"),
            new OpenSourceSoftware("Codehaus", "XStream", "BSD")};
        final StringWriter writer = new StringWriter();
        final PrettyPrintWriter prettyPrintWriter = new PrettyPrintWriter(writer);
        new TreeMarshaller(prettyPrintWriter, converterLookup, mapper).start(software, null);
        prettyPrintWriter.flush();
        assertEquals(""
View Full Code Here

        assertEquals("foo", childA.getParentStuff().iterator().next());
    }

    public void testCanWriteInheritanceHierarchiesInOldOrder() {
        xstream = new XStream(new PureJavaReflectionProvider(new FieldDictionary(new XStream12FieldKeySorter())));
        OpenSourceSoftware openSourceSoftware = new OpenSourceSoftware("apache", "geronimo", "license");
        String xml =
                "<oss>\n" +
                "  <license>license</license>\n" +
                "  <vendor>apache</vendor>\n" +
                "  <name>geronimo</name>\n" +
View Full Code Here

        targets.put("CharSequenceArray", new CharSequence[]{"text", new StringBuffer("buffer"), null});
        targets.put("CharSequenceArray+ID", new CharSequence[]{"text", new StringBuffer("buffer"), null});
        targets.put("EmptyStringArray", new String[][]{new String[0]});
        targets.put("EmptyStringArray+ID", new String[][]{new String[0]});
        targets.put("Properties", properties);
        targets.put("Object", new OpenSourceSoftware("Codehaus", "XStream", "BSD"));
        targets.put("AttributeOnly", new OpenSourceSoftware(null, null, "BSD"));
        targets.put("X", x);
        targets.put("EmptyX", emptyX);
        targets.put("Collections", lists);

        final Map results = new HashMap();
View Full Code Here

        xstream = (XStream)xstream.fromXML(xstream.toXML(createXStream()));
        testCanConvertAnotherInstance();
    }
   
    public void testCanSerializeSelfContained() throws ClassNotFoundException, ObjectStreamException {
        final OpenSourceSoftware oos = new OpenSourceSoftware("Walnes", "XStream", "BSD");
        xstream.alias("software", OpenSourceSoftware.class);
        String xml = new XStreamer().toXML(xstream, oos);
        assertEquals(oos, new XStreamer().fromXML(xml));
    }
View Full Code Here

import java.util.Map;


public class InheritanceTest extends AbstractAcceptanceTest {
    public void testHandlesInheritanceHierarchies() {
        OpenSourceSoftware openSourceSoftware = new OpenSourceSoftware("apache", "geronimo", "license");
        String xml =
                "<oss>\n" +
                "  <vendor>apache</vendor>\n" +
                "  <name>geronimo</name>\n" +
                "  <license>license</license>\n" +
View Full Code Here

TOP

Related Classes of com.thoughtworks.acceptance.objects.OpenSourceSoftware

Copyright © 2018 www.massapicom. 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.