Package org.dozer.vo

Examples of org.dozer.vo.GetWeatherByZipCodeDocument


  public void testXmlBeans() throws Exception {
    mapper = getMapper(new String[] { "xmlBeansMapping.xml" });
    // Map from TestObject to XMLBeans
    TestObject to = (TestObject) newInstance(TestObject.class);
    to.setOne("one");
    GetWeatherByZipCodeDocument doc = mapper.map(to, GetWeatherByZipCodeDocument.class);
    assertEquals(to.getOne(), doc.getGetWeatherByZipCode().getZipCode());

    // Map from XMLBeans to TestObject
    GetWeatherByZipCodeDocument res = GetWeatherByZipCodeDocument.Factory.newInstance();
    GetWeatherByZipCode zipCode = res.addNewGetWeatherByZipCode();
    zipCode.setZipCode("one");
    TestObject to2 = mapper.map(res, TestObject.class);
    assertEquals(res.getGetWeatherByZipCode().getZipCode(), to2.getOne());

    Set set = new HashSet();
    AnotherTestObject ato = new AnotherTestObject();
    ato.setDay("day");
    set.add(ato);
View Full Code Here


  public void testXmlBeans() throws Exception {
    mapper = getMapper(new String[] { "xmlBeansMapping.xml" });
    // Map from TestObject to XMLBeans
    TestObject to = (TestObject) newInstance(TestObject.class);
    to.setOne("one");
    GetWeatherByZipCodeDocument doc = mapper.map(to, GetWeatherByZipCodeDocument.class);
    assertEquals(to.getOne(), doc.getGetWeatherByZipCode().getZipCode());

    // Map from XMLBeans to TestObject
    GetWeatherByZipCodeDocument res = GetWeatherByZipCodeDocument.Factory.newInstance();
    GetWeatherByZipCode zipCode = res.addNewGetWeatherByZipCode();
    zipCode.setZipCode("one");
    TestObject to2 = mapper.map(res, TestObject.class);
    assertEquals(res.getGetWeatherByZipCode().getZipCode(), to2.getOne());

    Set set = new HashSet();
    AnotherTestObject ato = new AnotherTestObject();
    ato.setDay("day");
    set.add(ato);
View Full Code Here

TOP

Related Classes of org.dozer.vo.GetWeatherByZipCodeDocument

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.