1717import { expect } from 'chai' ;
1818import { Account } from '../../../src/model/account/Account' ;
1919import { Address } from '../../../src/model/account/Address' ;
20+ import { PropertyModificationType } from '../../../src/model/account/PropertyModificationType' ;
21+ import { PropertyType } from '../../../src/model/account/PropertyType' ;
2022import { NetworkType } from '../../../src/model/blockchain/NetworkType' ;
21- import { PropertyModificationType , PropertyType , TransactionType } from '../../../src/model/model' ;
2223import { MosaicId } from '../../../src/model/mosaic/MosaicId' ;
24+ import { AccountPropertyModification } from '../../../src/model/transaction/AccountPropertyModification' ;
2325import { AccountPropertyTransaction } from '../../../src/model/transaction/AccountPropertyTransaction' ;
2426import { Deadline } from '../../../src/model/transaction/Deadline' ;
27+ import { TransactionType } from '../../../src/model/transaction/TransactionType' ;
2528import { UInt64 } from '../../../src/model/UInt64' ;
2629import { TestingAccount } from '../../conf/conf.spec' ;
2730
@@ -33,7 +36,7 @@ describe('AccountPropertyTransaction', () => {
3336 } ) ;
3437 it ( 'should create address property filter' , ( ) => {
3538 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
36- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
39+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
3740 PropertyModificationType . Add ,
3841 address ,
3942 ) ;
@@ -43,7 +46,7 @@ describe('AccountPropertyTransaction', () => {
4346
4447 it ( 'should create mosaic property filter' , ( ) => {
4548 const mosaicId = new MosaicId ( [ 2262289484 , 3405110546 ] ) ;
46- const mosaicPropertyFilter = AccountPropertyTransaction . createMosaicFilter (
49+ const mosaicPropertyFilter = AccountPropertyModification . createForMosaic (
4750 PropertyModificationType . Add ,
4851 mosaicId ,
4952 ) ;
@@ -54,7 +57,7 @@ describe('AccountPropertyTransaction', () => {
5457
5558 it ( 'should create entity type property filter' , ( ) => {
5659 const entityType = TransactionType . ADDRESS_ALIAS ;
57- const entityTypePropertyFilter = AccountPropertyTransaction . createEntityTypeFilter (
60+ const entityTypePropertyFilter = AccountPropertyModification . createForEntityType (
5861 PropertyModificationType . Add ,
5962 entityType ,
6063 ) ;
@@ -65,7 +68,7 @@ describe('AccountPropertyTransaction', () => {
6568 describe ( 'size' , ( ) => {
6669 it ( 'should return 148 for ModifyAccountPropertyAddressTransaction transaction byte size with 1 modification' , ( ) => {
6770 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
68- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
71+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
6972 PropertyModificationType . Add ,
7073 address ,
7174 ) ;
@@ -81,7 +84,7 @@ describe('AccountPropertyTransaction', () => {
8184
8285 it ( 'should return 131 for ModifyAccountPropertyMosaicTransaction transaction byte size with 1 modification' , ( ) => {
8386 const mosaicId = new MosaicId ( [ 2262289484 , 3405110546 ] ) ;
84- const mosaicPropertyFilter = AccountPropertyTransaction . createMosaicFilter (
87+ const mosaicPropertyFilter = AccountPropertyModification . createForMosaic (
8588 PropertyModificationType . Add ,
8689 mosaicId ,
8790 ) ;
@@ -96,7 +99,7 @@ describe('AccountPropertyTransaction', () => {
9699
97100 it ( 'should return 125 for ModifyAccountPropertyEntityTypeTransaction transaction byte size with 1 modification' , ( ) => {
98101 const entityType = TransactionType . ADDRESS_ALIAS ;
99- const entityTypePropertyFilter = AccountPropertyTransaction . createEntityTypeFilter (
102+ const entityTypePropertyFilter = AccountPropertyModification . createForEntityType (
100103 PropertyModificationType . Add ,
101104 entityType ,
102105 ) ;
@@ -110,10 +113,9 @@ describe('AccountPropertyTransaction', () => {
110113 } ) ;
111114 } ) ;
112115
113-
114116 it ( 'should default maxFee field be set to 0' , ( ) => {
115117 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
116- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
118+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
117119 PropertyModificationType . Add ,
118120 address ,
119121 ) ;
@@ -130,7 +132,7 @@ describe('AccountPropertyTransaction', () => {
130132
131133 it ( 'should filled maxFee override transaction maxFee' , ( ) => {
132134 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
133- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
135+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
134136 PropertyModificationType . Add ,
135137 address ,
136138 ) ;
@@ -139,7 +141,7 @@ describe('AccountPropertyTransaction', () => {
139141 PropertyType . AllowAddress ,
140142 [ addressPropertyFilter ] ,
141143 NetworkType . MIJIN_TEST ,
142- new UInt64 ( [ 1 , 0 ] )
144+ new UInt64 ( [ 1 , 0 ] ) ,
143145 ) ;
144146
145147 expect ( addressPropertyTransaction . maxFee . higher ) . to . be . equal ( 0 ) ;
@@ -149,7 +151,7 @@ describe('AccountPropertyTransaction', () => {
149151 it ( 'should create address property transaction' , ( ) => {
150152
151153 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
152- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
154+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
153155 PropertyModificationType . Add ,
154156 address ,
155157 ) ;
@@ -172,7 +174,7 @@ describe('AccountPropertyTransaction', () => {
172174 it ( 'should throw exception when create address property transaction with wrong type' , ( ) => {
173175
174176 const address = Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ;
175- const addressPropertyFilter = AccountPropertyTransaction . createAddressFilter (
177+ const addressPropertyFilter = AccountPropertyModification . createForAddress (
176178 PropertyModificationType . Add ,
177179 address ,
178180 ) ;
@@ -191,7 +193,7 @@ describe('AccountPropertyTransaction', () => {
191193 it ( 'should create mosaic property transaction' , ( ) => {
192194
193195 const mosaicId = new MosaicId ( [ 2262289484 , 3405110546 ] ) ;
194- const mosaicPropertyFilter = AccountPropertyTransaction . createMosaicFilter (
196+ const mosaicPropertyFilter = AccountPropertyModification . createForMosaic (
195197 PropertyModificationType . Add ,
196198 mosaicId ,
197199 ) ;
@@ -214,7 +216,7 @@ describe('AccountPropertyTransaction', () => {
214216 it ( 'should throw exception when create mosaic property transaction with wrong type' , ( ) => {
215217
216218 const mosaicId = new MosaicId ( [ 2262289484 , 3405110546 ] ) ;
217- const mosaicPropertyFilter = AccountPropertyTransaction . createMosaicFilter (
219+ const mosaicPropertyFilter = AccountPropertyModification . createForMosaic (
218220 PropertyModificationType . Add ,
219221 mosaicId ,
220222 ) ;
@@ -233,7 +235,7 @@ describe('AccountPropertyTransaction', () => {
233235 it ( 'should create entity type property transaction' , ( ) => {
234236
235237 const entityType = TransactionType . ADDRESS_ALIAS ;
236- const entityTypePropertyFilter = AccountPropertyTransaction . createEntityTypeFilter (
238+ const entityTypePropertyFilter = AccountPropertyModification . createForEntityType (
237239 PropertyModificationType . Add ,
238240 entityType ,
239241 ) ;
0 commit comments