1414 * limitations under the License.
1515 */
1616
17- import { deepEqual } from 'assert' ;
1817import { assert , expect } from 'chai' ;
1918import { AccountHttp } from '../../src/infrastructure/AccountHttp' ;
20- import { Listener , TransactionHttp } from '../../src/infrastructure/infrastructure' ;
21- import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp' ;
19+ import { Listener } from '../../src/infrastructure/Listener' ;
20+ import { MultisigHttp } from '../../src/infrastructure/MultisigHttp' ;
21+ import { NamespaceHttp } from '../../src/infrastructure/NamespaceHttp' ;
22+ import { RestrictionAccountHttp } from '../../src/infrastructure/RestrictionAccountHttp' ;
23+ import { TransactionHttp } from '../../src/infrastructure/TransactionHttp' ;
2224import { Account } from '../../src/model/account/Account' ;
2325import { Address } from '../../src/model/account/Address' ;
2426import { PublicAccount } from '../../src/model/account/PublicAccount' ;
@@ -27,16 +29,10 @@ import { PlainMessage } from '../../src/model/message/PlainMessage';
2729import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic' ;
2830import { AliasAction } from '../../src/model/namespace/AliasAction' ;
2931import { NamespaceId } from '../../src/model/namespace/NamespaceId' ;
30- import { AccountRestrictionModificationAction } from '../../src/model/restriction/AccountRestrictionModificationAction' ;
31- import { AccountRestrictionFlags } from '../../src/model/restriction/AccountRestrictionType' ;
32- import { AccountRestrictionModification } from '../../src/model/transaction/AccountRestrictionModification' ;
33- import { AccountRestrictionTransaction } from '../../src/model/transaction/AccountRestrictionTransaction' ;
3432import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction' ;
3533import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction' ;
36- import { CosignatoryModificationAction } from '../../src/model/transaction/CosignatoryModificationAction' ;
3734import { Deadline } from '../../src/model/transaction/Deadline' ;
3835import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction' ;
39- import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification' ;
4036import { NamespaceRegistrationTransaction } from '../../src/model/transaction/NamespaceRegistrationTransaction' ;
4137import { TransferTransaction } from '../../src/model/transaction/TransferTransaction' ;
4238import { UInt64 } from '../../src/model/UInt64' ;
@@ -53,7 +49,9 @@ describe('AccountHttp', () => {
5349 let accountPublicKey : string ;
5450 let publicAccount : PublicAccount ;
5551 let accountHttp : AccountHttp ;
56- let restrictionHttp : RestrictionHttp ;
52+ let multisigHttp : MultisigHttp ;
53+ let namespaceHttp : NamespaceHttp ;
54+ let restrictionHttp : RestrictionAccountHttp ;
5755 let transactionHttp : TransactionHttp ;
5856 let namespaceId : NamespaceId ;
5957 let generationHash : string ;
@@ -80,7 +78,9 @@ describe('AccountHttp', () => {
8078 generationHash = json . generationHash ;
8179 accountHttp = new AccountHttp ( json . apiUrl ) ;
8280 transactionHttp = new TransactionHttp ( json . apiUrl ) ;
83- restrictionHttp = new RestrictionHttp ( json . apiUrl ) ;
81+ restrictionHttp = new RestrictionAccountHttp ( json . apiUrl ) ;
82+ multisigHttp = new MultisigHttp ( json . apiUrl ) ;
83+ namespaceHttp = new NamespaceHttp ( json . apiUrl ) ;
8484 done ( ) ;
8585 } ) ;
8686 } ) ;
@@ -256,7 +256,7 @@ describe('AccountHttp', () => {
256256 describe ( 'getMultisigAccountGraphInfo' , ( ) => {
257257 it ( 'should call getMultisigAccountGraphInfo successfully' , ( done ) => {
258258 setTimeout ( ( ) => {
259- accountHttp . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountGraphInfo ) => {
259+ multisigHttp . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountGraphInfo ) => {
260260 expect ( multisigAccountGraphInfo . multisigAccounts . get ( 0 ) ! [ 0 ] .
261261 account . publicKey ) . to . be . equal ( multisigAccount . publicKey ) ;
262262 done ( ) ;
@@ -267,7 +267,7 @@ describe('AccountHttp', () => {
267267 describe ( 'getMultisigAccountInfo' , ( ) => {
268268 it ( 'should call getMultisigAccountInfo successfully' , ( done ) => {
269269 setTimeout ( ( ) => {
270- accountHttp . getMultisigAccountInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountInfo ) => {
270+ multisigHttp . getMultisigAccountInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountInfo ) => {
271271 expect ( multisigAccountInfo . account . publicKey ) . to . be . equal ( multisigAccount . publicKey ) ;
272272 done ( ) ;
273273 } ) ;
@@ -277,7 +277,7 @@ describe('AccountHttp', () => {
277277
278278 describe ( 'outgoingTransactions' , ( ) => {
279279 it ( 'should call outgoingTransactions successfully' , ( done ) => {
280- accountHttp . outgoingTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
280+ accountHttp . getAccountOutgoingTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
281281 expect ( transactions . length ) . to . be . greaterThan ( 0 ) ;
282282 done ( ) ;
283283 } ) ;
@@ -286,7 +286,7 @@ describe('AccountHttp', () => {
286286
287287 describe ( 'aggregateBondedTransactions' , ( ) => {
288288 it ( 'should call aggregateBondedTransactions successfully' , ( done ) => {
289- accountHttp . aggregateBondedTransactions ( publicAccount . address ) . subscribe ( ( ) => {
289+ accountHttp . getAccountPartialTransactions ( publicAccount . address ) . subscribe ( ( ) => {
290290 done ( ) ;
291291 } , ( error ) => {
292292 console . log ( 'Error:' , error ) ;
@@ -297,7 +297,7 @@ describe('AccountHttp', () => {
297297
298298 describe ( 'transactions' , ( ) => {
299299 it ( 'should call transactions successfully' , ( done ) => {
300- accountHttp . transactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
300+ accountHttp . getAccountTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
301301 expect ( transactions . length ) . to . be . greaterThan ( 0 ) ;
302302 done ( ) ;
303303 } ) ;
@@ -306,7 +306,7 @@ describe('AccountHttp', () => {
306306
307307 describe ( 'unconfirmedTransactions' , ( ) => {
308308 it ( 'should call unconfirmedTransactions successfully' , ( done ) => {
309- accountHttp . unconfirmedTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
309+ accountHttp . getAccountUnconfirmedTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
310310 expect ( transactions . length ) . to . be . equal ( 0 ) ;
311311 done ( ) ;
312312 } ) ;
@@ -315,7 +315,7 @@ describe('AccountHttp', () => {
315315
316316 describe ( 'getAddressNames' , ( ) => {
317317 it ( 'should call getAddressNames successfully' , ( done ) => {
318- accountHttp . getAccountsNames ( [ accountAddress ] ) . subscribe ( ( addressNames ) => {
318+ namespaceHttp . getAccountsNames ( [ accountAddress ] ) . subscribe ( ( addressNames ) => {
319319 expect ( addressNames . length ) . to . be . greaterThan ( 0 ) ;
320320 done ( ) ;
321321 } ) ;
0 commit comments