@@ -14,78 +14,78 @@ describe('130820 Fusion Stereo', function () {
14
14
it ( 'complet current source sentence converts' , function ( ) {
15
15
var tree = require ( "../n2kMapper.js" ) . toNested (
16
16
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.901Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Source Name","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Source","A":128,"Source ID":4,"Current Source ID":4,"D":3,"E":5,"Source":"SiriusXM"}}' ) ) ;
17
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone2.source.value' , 'entertainment.device.fusion1.avsource.source4' ) ;
18
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.name.value' , "SiriusXM" ) ;
17
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone2.source.value' , 'entertainment.device.fusion1.avsource.source4' ) ;
18
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.name.value' , "SiriusXM" ) ;
19
19
//tree.should.be.validSignalKVesselIgnoringIdentity;
20
20
} ) ;
21
21
22
22
23
23
it ( 'complet SiriusXM channel sentence converts' , function ( ) {
24
24
var tree = require ( "../n2kMapper.js" ) . toNested (
25
25
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.906Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: SiriusXM Channel","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"SiriusXM Channel","A":6554752,"Channel":"xL Howard 100"}}' ) ) ;
26
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.tuner.stationName.value' , 'xL Howard 100' ) ;
26
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.tuner.stationName.value' , 'xL Howard 100' ) ;
27
27
//tree.should.be.validSignalKVesselIgnoringIdentity;
28
28
} ) ;
29
29
30
30
it ( 'complet SiriusXM Genre sentence converts' , function ( ) {
31
31
var tree = require ( "../n2kMapper.js" ) . toNested (
32
32
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.911Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: SiriusXM Genre","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"SiriusXM Genre","A":6554752,"Genre":"Howard Stern"}}' ) ) ;
33
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.track.genre.value' , 'Howard Stern' ) ;
33
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.track.genre.value' , 'Howard Stern' ) ;
34
34
//tree.should.be.validSignalKVesselIgnoringIdentity;
35
35
} ) ;
36
36
37
37
it ( 'complet SiriusXM title sentence converts' , function ( ) {
38
38
var tree = require ( "../n2kMapper.js" ) . toNested (
39
39
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.915Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: SiriusXM Title","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"SiriusXM Title","A":6554752,"Title":"A title"}}' ) ) ;
40
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.track.name.value' , 'A title' ) ;
40
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.track.name.value' , 'A title' ) ;
41
41
//tree.should.be.validSignalKVesselIgnoringIdentity;
42
42
} ) ;
43
43
44
44
it ( 'complet SiriusXM Artist sentence converts' , function ( ) {
45
45
var tree = require ( "../n2kMapper.js" ) . toNested (
46
46
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.918Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: SiriusXM Artist","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"SiriusXM Artist","A":6554752,"Artist":"Howard Stern"}}' ) ) ;
47
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.track.artistName.value' , 'Howard Stern' ) ;
47
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.track.artistName.value' , 'Howard Stern' ) ;
48
48
//tree.should.be.validSignalKVesselIgnoringIdentity;
49
49
} ) ;
50
50
51
51
it ( 'complet mute sentence converts' , function ( ) {
52
52
var tree = require ( "../n2kMapper.js" ) . toNested (
53
53
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.973Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Mute","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Mute","A":128,"Mute":"Not Muted"}}' ) ) ;
54
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.isMuted.value' , false ) ;
54
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.isMuted.value' , false ) ;
55
55
//tree.should.be.validSignalKVesselIgnoringIdentity;
56
56
} ) ;
57
57
58
58
it ( 'complete equalizer sentence converts' , function ( ) {
59
59
var tree = require ( "../n2kMapper.js" ) . toNested (
60
60
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.986Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Tone","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Tone","A":128,"B":3,"Bass":1,"Mid":2,"Treble":3}}' ) ) ;
61
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.equalizer.bass' , 1 ) ;
62
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.equalizer.mid' , 2 ) ;
63
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.equalizer.treble' , 3 ) ;
61
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.equalizer.bass' , 1 ) ;
62
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.equalizer.mid' , 2 ) ;
63
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.equalizer.treble' , 3 ) ;
64
64
//tree.should.be.validSignalKVesselIgnoringIdentity;
65
65
} ) ;
66
66
67
67
it ( 'complet volume sentence converts' , function ( ) {
68
68
var tree = require ( "../n2kMapper.js" ) . toNested (
69
69
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.991Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Volume","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Volume","A":128,"Zone 1":10,"Zone 2":11,"Zone 3":12,"Zone 4":13}}' ) ) ;
70
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.volume.master.value' , 10 ) ;
71
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone2.volume.master.value' , 11 ) ;
72
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone3.volume.master.value' , 12 ) ;
73
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone4.volume.master.value' , 13 ) ;
70
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.volume.master.value' , 10 ) ;
71
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone2.volume.master.value' , 11 ) ;
72
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone3.volume.master.value' , 12 ) ;
73
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone4.volume.master.value' , 13 ) ;
74
74
//tree.should.be.validSignalKVesselIgnoringIdentity;
75
75
} ) ;
76
76
77
77
it ( 'complet zone name sentence converts' , function ( ) {
78
78
var tree = require ( "../n2kMapper.js" ) . toNested (
79
79
JSON . parse ( '{"timestamp":"2016-11-26T20:40:00.996Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Zone Name","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Zone Name","A":128,"Number":0,"Name":"Cockpit"}}' ) ) ;
80
- tree . should . have . deep . property ( 'entertainment.device.fusion1.output.zone1.name.value' , 'Cockpit' ) ;
80
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.output.zone1.name.value' , 'Cockpit' ) ;
81
81
//tree.should.be.validSignalKVesselIgnoringIdentity;
82
82
} ) ;
83
83
84
84
85
85
it ( 'complet track name sentence converts' , function ( ) {
86
86
var tree = require ( "../n2kMapper.js" ) . toNested (
87
87
JSON . parse ( '{"timestamp":"2016-11-12T20:26:52.150Z","prio":7,"src":10,"dst":255,"pgn":130820,"description":"Fusion: Track","fields":{"Manufacturer Code":"Fusion","Industry Code":"Marine Industry","Message ID":"Track Title","A":128,"B":3592,"Track":"Flow"}}' ) ) ;
88
- tree . should . have . deep . property ( 'entertainment.device.fusion1.avsource.source4.track.name.value' , 'Flow' ) ;
88
+ tree . should . have . nested . property ( 'entertainment.device.fusion1.avsource.source4.track.name.value' , 'Flow' ) ;
89
89
//tree.should.be.validSignalKVesselIgnoringIdentity;
90
90
} ) ;
91
91
0 commit comments