← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11778: minor updates to JacksonUtilsTest

 

------------------------------------------------------------
revno: 11778
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-08-23 16:04:23 +0200
message:
  minor updates to JacksonUtilsTest
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf/metadata/JacksonUtilsTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf/metadata/JacksonUtilsTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf/metadata/JacksonUtilsTest.java	2013-08-23 13:58:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf/metadata/JacksonUtilsTest.java	2013-08-23 14:04:23 +0000
@@ -39,19 +39,14 @@
     @Test
     public void serializableTest() throws Exception
     {
-        MetaData metaData = new MetaData();
-        JacksonUtils.toJsonAsString( metaData );
-        JacksonUtils.toXmlAsString( metaData );
+        JacksonUtils.toJsonAsString( new MetaData() );
+        JacksonUtils.toXmlAsString( new MetaData() );
     }
 
     @Test
     public void deserializableTest() throws Exception
     {
-        MetaData metaData = new MetaData();
-        String jsonString = JacksonUtils.toJsonAsString( metaData );
-        String xmlString = JacksonUtils.toXmlAsString( metaData );
-
-        JacksonUtils.fromJson( jsonString, MetaData.class );
-        JacksonUtils.fromXml( xmlString, MetaData.class );
+        JacksonUtils.fromJson( "{}", MetaData.class );
+        JacksonUtils.fromXml( "<?xml version='1.0' encoding='UTF-8'?><metaData xmlns=\"http://dhis2.org/schema/dxf/2.0\"/>", MetaData.class );
     }
 }