Package org.apache.ws.jaxme.tests.printparse

Examples of org.apache.ws.jaxme.tests.printparse.Test


     */
    public void testPrint() throws Exception {
      boolean[] bools = new boolean[]{false, true};
        int[] ints = new int[]{0,1};
        for (int i = 0;  i < bools.length;  i++) {
            Test test = new TestImpl();
            test.setBool(bools[i]);
            StringWriter sw = new StringWriter();
            Marshaller m = getJAXBContext().createMarshaller();
            m.setProperty(JMMarshallerImpl.JAXME_XML_DECLARATION, Boolean.FALSE);
            m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
            m.marshal(test, sw);
View Full Code Here


        for (int i = 0;  i < bools.length;  i++) {
            String input =
                "<Test xmlns=\"" + getNamespace() + "\"><Bool>" + ints[i] +
                "</Bool></Test>";
            Unmarshaller u = getJAXBContext().createUnmarshaller();
            Test test = (Test) u.unmarshal(new InputSource(new StringReader(input)));
            assertEquals(bools[i], test.isBool());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.tests.printparse.Test

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.