Package org.jboss.test.xml.choice

Examples of org.jboss.test.xml.choice.Root


   {
      log.debug("testChoice> started");
      long startTime = System.currentTimeMillis();

      String xsdUrl = getXsd("xml/choice.xsd");
      Root root = newChoiceRoot();
      String xml = marshalChoiceRoot(xsdUrl, root);

      StringReader reader = new StringReader(xml);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Root unmarshalled = (Root)unmarshaller.unmarshal(reader, new MappingObjectModelFactory(), null);
      log.info("unmarhalled:\n" + unmarshalled);

      assertEquals(root, unmarshalled);

      log.debug("testChoice> done in " + (System.currentTimeMillis() - startTime));
View Full Code Here


      String c = "c";

      List choice1 = Arrays.asList(new Choice1[]{new Choice1(a, null), new Choice1(null, b)});
      List choice2 = Arrays.asList(new Choice2[]{new Choice2(a, b, null), new Choice2(a, null, c)});

      Root root = new Root();
      root.setChoice1(choice1);
      root.setChoice2(choice2);
      return root;
   }
View Full Code Here

   {
      log.debug("testChoice> started");
      long startTime = System.currentTimeMillis();

      String xsdUrl = getXsd("xml/choice.xsd");
      Root root = newChoiceRoot();
      String xml = marshalChoiceRoot(xsdUrl, root);

      StringReader reader = new StringReader(xml);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Root unmarshalled = (Root)unmarshaller.unmarshal(reader, new MappingObjectModelFactory(), null);
      assertEquals(root, unmarshalled);

      log.debug("testChoice> done in " + (System.currentTimeMillis() - startTime));
   }
View Full Code Here

      String c = "c";

      List<Choice1> choice1 = Arrays.asList(new Choice1[]{new Choice1(a, null), new Choice1(null, b)});
      List<Choice2> choice2 = Arrays.asList(new Choice2[]{new Choice2(a, b, null), new Choice2(a, null, c)});

      Root root = new Root();
      root.setChoice1(choice1);
      root.setChoice2(choice2);
      return root;
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.xml.choice.Root

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.