My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.vineetmanohar.util;

import javax.xml.bind.JAXBException;

import org.junit.Assert;
import org.junit.Test;
import org.xml.sax.SAXException;

import com.vineetmanohar.sitemap.jaxb.Urlset;

/**
* @author Vineet Manohar
*/
public class JaxbWrapperTest {
@Test
public void testXmlToObject() throws JAXBException, SAXException {
JaxbWrapper<Urlset> sitemapJaxbWrapper = new JaxbWrapper<Urlset>(getClass().getResource("/sitemap.xsd"),
Urlset.class);
Urlset urlset = sitemapJaxbWrapper.xmlToObject(getClass().getResourceAsStream("/sample-sitemap.xml"));
Assert.assertNotNull(urlset);
}
}

Change log

r8 by vineet.manohar on Sep 2, 2009   Diff
added utility methods
Go to: 
Project members, sign in to write a code review

Older revisions

r6 by vineet.manohar on Sep 2, 2009   Diff
generalized class using generics
All revisions of this file

File info

Size: 646 bytes, 22 lines
Powered by Google Project Hosting