File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
string-plugin/src/test/java/com/github/underscore/string Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1430,6 +1430,16 @@ public void fromXml2() {
14301430 $ .toJson ((Map <String , Object >) $ .fromXml (string )));
14311431 }
14321432
1433+ @ SuppressWarnings ("unchecked" )
1434+ @ Test
1435+ public void fetchGetXml () {
1436+ String xml = "<?xml version=\" 1.0\" encoding=\" UTF-8\" ?><report><time/><coords><x>3916.234</x><y>169.914</y><z>6.33</z>"
1437+ + "</coords><code>NMR</code><message>Another day of everyday normal regular weather, business as usual, unless "
1438+ + "it’s going to be like the time of the Great Paprika Mayonnaise Incident of 2014, that was some pretty nasty "
1439+ + "stuff.</message><varX-Rating>8</varX-Rating></report>" ;
1440+ assertEquals ("NMR" , (String ) ((Map <String , Object >) $ .fromXml (xml )).get ("code" ));
1441+ }
1442+
14331443 @ Test (expected = IllegalArgumentException .class )
14341444 public void testDecodeParseXmlErr13 () {
14351445 $ .fromXml ("[\" abc\u0010 \" ]" );
You can’t perform that action at this time.
0 commit comments