5253545556575859
} @Test public void canCreate_typedOject_fromXml() throws Exception { String xmlString = new IOUtil().loadTextFromUrl(JuUrl.resourceRelativeTo("XmlUtilsTest_canCreateXml_fromJaxbObject.xml", XmlUtilsJaxbTest.class)); Player p = XmlUtils.marshaller().unmarshal(xmlString, Player.class); this.assertMichael(p); }
117118119120121122123124125126127128129
} private Player getMichael(int age) { ObjectFactory playerFactory = new ObjectFactory(); Player p = playerFactory.createPlayer(); p.setFirstName("Michael"); p.setLastName("Jordan"); p.setSalutation(SalutationType.MR); p.setAge(age); return p; }
4748495051525354
112113114115116117118119120121122123124