File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 1+ var Jsonix = require ( "../../jsonix" ) . Jsonix ;
2+ var GH62 = require ( "./Mappings.js" ) . GH62 ;
3+
4+ module . exports = {
5+ "MarshallsWithPrefix" : function ( test ) {
6+ var context = new Jsonix . Context ( [ GH62 ] , {
7+ namespacePrefixes : {
8+ "urn:gh62" : "gh62"
9+ }
10+ } ) ;
11+ var marshaller = context . createMarshaller ( ) ;
12+ var data = {
13+ name : { localPart : "root" , namespaceURI : "urn:gh62" } ,
14+ value : {
15+ toor : "orto"
16+ }
17+ } ;
18+ var marshalled = marshaller . marshalString ( data ) ;
19+ test . equal ( "<gh62:root xmlns:gh62=\"urn:gh62\"><gh62:toor>orto</gh62:toor></gh62:root>" , marshalled ) ;
20+ test . done ( ) ;
21+ } ,
22+ "MarshallsWithoutPrefix" : function ( test ) {
23+ var context = new Jsonix . Context ( [ GH62 ] , {
24+ namespacePrefixes : {
25+ "urn:gh62" : ""
26+ }
27+ } ) ;
28+ var marshaller = context . createMarshaller ( ) ;
29+ var data = {
30+ name : { localPart : "root" , namespaceURI : "urn:gh62" } ,
31+ value : {
32+ toor : "orto"
33+ }
34+ } ;
35+ var marshalled = marshaller . marshalString ( data ) ;
36+ test . equal ( "<root xmlns:gh62=\"urn:gh62\"><toor>orto</toor></root>" , marshalled ) ;
37+ test . done ( ) ;
38+ }
39+ } ;
Original file line number Diff line number Diff line change 1+ var GH62 = {
2+ name : "GH62" ,
3+ dens : "urn:gh62" ,
4+ typeInfos : [ {
5+ type : "classInfo" ,
6+ localName : "Root" ,
7+ propertyInfos : [ {
8+ name : "toor"
9+ } ]
10+ } ] ,
11+ elementInfos : [ {
12+ elementName : "root" ,
13+ typeInfo : ".Root"
14+ } ]
15+
16+ } ;
17+ module . exports . GH62 = GH62 ;
Original file line number Diff line number Diff line change 11module . exports = {
22 "Issues" : {
33 "GH56" : require ( './GH56/GH56' ) ,
4- "GH61" : require ( './GH61/GH61' )
4+ "GH61" : require ( './GH61/GH61' ) ,
5+ "GH62" : require ( './GH62/GH62' )
56 }
67} ;
You can’t perform that action at this time.
0 commit comments