Skip to content

Commit fea615b

Browse files
committed
Issue #111.
1 parent cb77d55 commit fea615b

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var Jsonix = require("../../jsonix").Jsonix;
2+
var GH111 = require("./Mappings.js").GH111;
3+
4+
module.exports = {
5+
"MarshallsWithPrefix" : function(test) {
6+
var context = new Jsonix.Context([GH111], {
7+
namespacePrefixes : {
8+
"urn:test" : ""
9+
}
10+
});
11+
var rootType = context.getTypeInfoByName("GH111.Root");
12+
test.equal('urn:gh111', rootType.getPropertyInfoByName("value").elementTypeInfos[0].elementName.namespaceURI);
13+
test.done();
14+
}
15+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
var GH111 = {
2+
name: "GH111",
3+
dens: "urn:gh111",
4+
typeInfos: [{
5+
localName: "Root",
6+
propertyInfos: [{
7+
name: "value",
8+
type: "elements",
9+
collection: true,
10+
elementTypeInfos: [{
11+
elementName: "a",
12+
typeInfo: "String"
13+
}, {
14+
elementName: "b",
15+
typeInfo: "Integer"
16+
}]
17+
}]
18+
}],
19+
elementInfos: [{
20+
elementName: "root",
21+
typeInfo: ".Root"
22+
}]
23+
24+
};
25+
module.exports.GH111 = GH111;

nodejs/scripts/tests/issues.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
"GH71" : require('./GH71/GH71'),
88
"GH73" : require('./GH73/GH73'),
99
"GH83" : require('./GH83/GH83'),
10-
"GH96" : require('./GH96/GH96')
10+
"GH96" : require('./GH96/GH96'),
11+
"GH111" : require('./GH111/GH111')
1112
}
1213
};

0 commit comments

Comments
 (0)