My favorites
▼
|
Sign in
vineetmanohar
Vineet Manohar's open source code
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
src
/
test
/
java
/
com
/
vineetmanohar
/
util
/
JaxbWrapperTest.java
‹r6
r19
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);
}
}
Show details
Hide details
Change log
r8
by vineet.manohar on Sep 2, 2009
Diff
added utility methods
Go to:
...eetmanohar/util/JaxbWrapper.java
...anohar/util/JaxbWrapperTest.java
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
View raw file
Powered by
Google Project Hosting