@@ -27,32 +27,22 @@ import {NamespaceId} from '../../../src/model/namespace/NamespaceId';
2727describe ( 'MosaicInfo' , ( ) => {
2828 const mosaicInfoDTO = {
2929 meta : {
30- active : true ,
3130 id : '59FDA0733F17CF0001772CBC' ,
32- index : 0 ,
3331 } ,
3432 mosaic : {
35- height : new UInt64 ( [ 1 , 0 ] ) ,
36- levy : { } ,
3733 mosaicId : new MosaicId ( [ 3646934825 , 3576016193 ] ) ,
38- nonce : new UInt64 ( [ 1 , 0 ] ) ,
39- owner : PublicAccount . createFromPublicKey ( 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF' ,
34+ supply : new UInt64 ( [ 3403414400 , 2095475 ] ) ,
35+ height : new UInt64 ( [ 1 , 0 ] ) ,
36+ owner : PublicAccount . createFromPublicKey (
37+ 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF' ,
4038 NetworkType . MIJIN_TEST ) ,
39+ revision : 1 ,
4140 properties : [
42- new UInt64 ( [
43- 6 ,
44- 0 ,
45- ] ) ,
46- new UInt64 ( [
47- 3 ,
48- 0 ,
49- ] ) ,
50- new UInt64 ( [
51- 1000 ,
52- 0 ,
53- ] ) ,
41+ new UInt64 ( [ 6 , 0 ] ) , // divisibility
42+ new UInt64 ( [ 3 , 0 ] ) , // flags
43+ new UInt64 ( [ 1000 , 0 ] ) , // duration
5444 ] ,
55- supply : new UInt64 ( [ 3403414400 , 2095475 ] ) ,
45+ levy : { } ,
5646 } ,
5747 } ;
5848
@@ -62,14 +52,12 @@ describe('MosaicInfo', () => {
6252
6353 it ( 'should createComplete an MosaicInfo object' , ( ) => {
6454 const mosaicInfo = new MosaicInfo (
65- mosaicInfoDTO . meta . active ,
66- mosaicInfoDTO . meta . index ,
6755 mosaicInfoDTO . meta . id ,
6856 mosaicInfoDTO . mosaic . mosaicId ,
69- mosaicInfoDTO . mosaic . nonce ,
7057 mosaicInfoDTO . mosaic . supply ,
7158 mosaicInfoDTO . mosaic . height ,
7259 mosaicInfoDTO . mosaic . owner ,
60+ mosaicInfoDTO . mosaic . revision ,
7361 new MosaicProperties (
7462 mosaicInfoDTO . mosaic . properties [ 0 ] ,
7563 mosaicInfoDTO . mosaic . properties [ 1 ] . compact ( ) ,
@@ -78,14 +66,12 @@ describe('MosaicInfo', () => {
7866 mosaicInfoDTO . mosaic . levy ,
7967 ) ;
8068
81- expect ( mosaicInfo . active ) . to . be . equal ( mosaicInfoDTO . meta . active ) ;
82- expect ( mosaicInfo . index ) . to . be . equal ( mosaicInfoDTO . meta . index ) ;
8369 expect ( mosaicInfo . metaId ) . to . be . equal ( mosaicInfoDTO . meta . id ) ;
8470 deepEqual ( mosaicInfo . mosaicId , mosaicInfoDTO . mosaic . mosaicId ) ;
85- deepEqual ( mosaicInfo . nonce , mosaicInfoDTO . mosaic . nonce ) ;
8671 deepEqual ( mosaicInfo . supply , mosaicInfoDTO . mosaic . supply ) ;
8772 deepEqual ( mosaicInfo . height , mosaicInfoDTO . mosaic . height ) ;
8873 expect ( mosaicInfo . owner ) . to . be . equal ( mosaicInfoDTO . mosaic . owner ) ;
74+ deepEqual ( mosaicInfo . revision , mosaicInfoDTO . mosaic . revision ) ;
8975
9076 expect ( mosaicInfo . divisibility ) . to . be . equal ( mosaicInfoDTO . mosaic . properties [ 1 ] . lower ) ;
9177 deepEqual ( mosaicInfo . duration , mosaicInfoDTO . mosaic . properties [ 2 ] ) ;
@@ -95,14 +81,12 @@ describe('MosaicInfo', () => {
9581 describe ( 'isSupplyMutable' , ( ) => {
9682 it ( 'should return true when it\'s mutable' , ( ) => {
9783 const mosaicInfo = new MosaicInfo (
98- mosaicInfoDTO . meta . active ,
99- mosaicInfoDTO . meta . index ,
10084 mosaicInfoDTO . meta . id ,
10185 mosaicInfoDTO . mosaic . mosaicId ,
102- mosaicInfoDTO . mosaic . nonce ,
10386 mosaicInfoDTO . mosaic . supply ,
10487 mosaicInfoDTO . mosaic . height ,
10588 mosaicInfoDTO . mosaic . owner ,
89+ mosaicInfoDTO . mosaic . revision ,
10690 MosaicProperties . create ( {
10791 supplyMutable : true ,
10892 transferable : false ,
@@ -118,14 +102,12 @@ describe('MosaicInfo', () => {
118102
119103 it ( 'should return false when it\'s immutable' , ( ) => {
120104 const mosaicInfo = new MosaicInfo (
121- mosaicInfoDTO . meta . active ,
122- mosaicInfoDTO . meta . index ,
123105 mosaicInfoDTO . meta . id ,
124106 mosaicInfoDTO . mosaic . mosaicId ,
125- mosaicInfoDTO . mosaic . nonce ,
126107 mosaicInfoDTO . mosaic . supply ,
127108 mosaicInfoDTO . mosaic . height ,
128109 mosaicInfoDTO . mosaic . owner ,
110+ mosaicInfoDTO . mosaic . revision ,
129111 MosaicProperties . create ( {
130112 supplyMutable : false ,
131113 transferable : false ,
@@ -142,14 +124,12 @@ describe('MosaicInfo', () => {
142124 describe ( 'isTransferable' , ( ) => {
143125 it ( 'should return true when it\'s transferable' , ( ) => {
144126 const mosaicInfo = new MosaicInfo (
145- mosaicInfoDTO . meta . active ,
146- mosaicInfoDTO . meta . index ,
147127 mosaicInfoDTO . meta . id ,
148128 mosaicInfoDTO . mosaic . mosaicId ,
149- mosaicInfoDTO . mosaic . nonce ,
150129 mosaicInfoDTO . mosaic . supply ,
151130 mosaicInfoDTO . mosaic . height ,
152131 mosaicInfoDTO . mosaic . owner ,
132+ mosaicInfoDTO . mosaic . revision ,
153133 MosaicProperties . create ( {
154134 supplyMutable : false ,
155135 transferable : true ,
@@ -164,14 +144,12 @@ describe('MosaicInfo', () => {
164144
165145 it ( 'should return false when it\'s not transferable' , ( ) => {
166146 const mosaicInfo = new MosaicInfo (
167- mosaicInfoDTO . meta . active ,
168- mosaicInfoDTO . meta . index ,
169147 mosaicInfoDTO . meta . id ,
170148 mosaicInfoDTO . mosaic . mosaicId ,
171- mosaicInfoDTO . mosaic . nonce ,
172149 mosaicInfoDTO . mosaic . supply ,
173150 mosaicInfoDTO . mosaic . height ,
174151 mosaicInfoDTO . mosaic . owner ,
152+ mosaicInfoDTO . mosaic . revision ,
175153 MosaicProperties . create ( {
176154 supplyMutable : false ,
177155 transferable : false ,
@@ -188,14 +166,12 @@ describe('MosaicInfo', () => {
188166 describe ( 'isLevyMutable' , ( ) => {
189167 it ( 'should return true when it\'s mutable' , ( ) => {
190168 const mosaicInfo = new MosaicInfo (
191- mosaicInfoDTO . meta . active ,
192- mosaicInfoDTO . meta . index ,
193169 mosaicInfoDTO . meta . id ,
194170 mosaicInfoDTO . mosaic . mosaicId ,
195- mosaicInfoDTO . mosaic . nonce ,
196171 mosaicInfoDTO . mosaic . supply ,
197172 mosaicInfoDTO . mosaic . height ,
198173 mosaicInfoDTO . mosaic . owner ,
174+ mosaicInfoDTO . mosaic . revision ,
199175 MosaicProperties . create ( {
200176 supplyMutable : true ,
201177 transferable : false ,
@@ -210,14 +186,12 @@ describe('MosaicInfo', () => {
210186
211187 it ( 'should return false when it\'s immutable' , ( ) => {
212188 const mosaicInfo = new MosaicInfo (
213- mosaicInfoDTO . meta . active ,
214- mosaicInfoDTO . meta . index ,
215189 mosaicInfoDTO . meta . id ,
216190 mosaicInfoDTO . mosaic . mosaicId ,
217- mosaicInfoDTO . mosaic . nonce ,
218191 mosaicInfoDTO . mosaic . supply ,
219192 mosaicInfoDTO . mosaic . height ,
220193 mosaicInfoDTO . mosaic . owner ,
194+ mosaicInfoDTO . mosaic . revision ,
221195 MosaicProperties . create ( {
222196 supplyMutable : false ,
223197 transferable : false ,
0 commit comments