Skip to content

Commit c39224a

Browse files
committed
Created IListener, added createListener to RepositoryFactory
Moved CreateTransactionFromDto tests from e2e Fixed some typos Removed cold down from e2e tests.
1 parent 9eff7cb commit c39224a

23 files changed

+175
-84
lines changed

e2e/infrastructure/AccountHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ describe('AccountHttp', () => {
7878
after(() => {
7979
helper.listener.close();
8080
});
81-
afterEach((done) => {
82-
// cold down
83-
setTimeout(done, 200);
84-
});
8581

8682
/**
8783
* =========================

e2e/infrastructure/BlockHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ describe('BlockHttp', () => {
5959
after(() => {
6060
helper.listener.close();
6161
});
62-
afterEach((done) => {
63-
// cold down
64-
setTimeout(done, 200);
65-
});
6662

6763
/**
6864
* =========================

e2e/infrastructure/IntegrationTestHelper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { RepositoryFactoryHttp } from "../../src/infrastructure/RepositoryFactor
1818
import { RepositoryFactory } from "../../src/infrastructure/RepositoryFactory";
1919
import { NetworkType } from "../../src/model/blockchain/NetworkType";
2020
import { combineLatest } from "rxjs";
21-
import { Listener } from "../../src/infrastructure/Listener";
21+
import { IListener } from "../../src/infrastructure/IListener";
2222
import { SignedTransaction } from "../../src/model/transaction/SignedTransaction";
2323
import { filter } from "rxjs/operators";
2424
import { Transaction } from "../../src/model/transaction/Transaction";
@@ -40,7 +40,7 @@ export class IntegrationTestHelper {
4040
public cosignAccount4: Account;
4141
public networkType: NetworkType;
4242
public generationHash: string;
43-
public listener: Listener;
43+
public listener: IListener;
4444
public maxFee: UInt64;
4545
public harvestingAccount: Account;
4646

@@ -56,7 +56,6 @@ export class IntegrationTestHelper {
5656
const json = JSON.parse(jsonData);
5757
console.log(`Running tests against: ${json.apiUrl}`);
5858
this.apiUrl = json.apiUrl;
59-
this.listener = new Listener(this.apiUrl);
6059
this.repositoryFactory = new RepositoryFactoryHttp(json.apiUrl);
6160
combineLatest(this.repositoryFactory.getGenerationHash(), this.repositoryFactory.getNetworkType()).subscribe(([generationHash, networkType]) => {
6261
this.networkType = networkType;
@@ -70,6 +69,7 @@ export class IntegrationTestHelper {
7069
this.cosignAccount3 = this.createAccount(json.cosignatory3Account);
7170
this.cosignAccount4 = this.createAccount(json.cosignatory4Account);
7271
this.harvestingAccount = this.createAccount(json.harvestingAccount);
72+
this.listener = this.repositoryFactory.createListener();
7373

7474
this.maxFee = UInt64.fromUint(1000000); //What would be the best maxFee? In the future we will load the fee multiplier from rest.
7575

e2e/infrastructure/Listener.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
import { assert, expect } from 'chai';
1717
import { AccountRepository } from '../../src/infrastructure/AccountRepository';
18-
import { Listener } from '../../src/infrastructure/Listener';
1918
import { TransactionRepository } from '../../src/infrastructure/TransactionRepository';
2019
import { Account } from '../../src/model/account/Account';
2120
import { NetworkType } from '../../src/model/blockchain/NetworkType';

e2e/infrastructure/MetadataHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ describe('MetadataHttp', () => {
6262
after(() => {
6363
helper.listener.close();
6464
});
65-
afterEach((done) => {
66-
// cold down
67-
setTimeout(done, 200);
68-
});
6965

7066
/**
7167
* =========================

e2e/infrastructure/MosaicHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ describe('MosaicHttp', () => {
5757
after(() => {
5858
helper.listener.close();
5959
});
60-
afterEach((done) => {
61-
// cold down
62-
setTimeout(done, 200);
63-
});
6460

6561
/**
6662
* =========================

e2e/infrastructure/NamespaceHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ describe('NamespaceHttp', () => {
5050
after(() => {
5151
helper.listener.close();
5252
});
53-
afterEach((done) => {
54-
// cold down
55-
setTimeout(done, 200);
56-
});
5753

5854
describe('NamespaceRegistrationTransaction', () => {
5955

e2e/infrastructure/RestrictionHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ describe('RestrictionHttp', () => {
6666
after(() => {
6767
helper.listener.close();
6868
});
69-
afterEach((done) => {
70-
// cold down
71-
setTimeout(done, 200);
72-
});
7369

7470
/**
7571
* =========================

e2e/infrastructure/TransactionHttp.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@ describe('TransactionHttp', () => {
131131
after(() => {
132132
helper.listener.close();
133133
});
134-
afterEach((done) => {
135-
// cold down
136-
setTimeout(done, 200);
137-
});
138134

139135
describe('Get network currency mosaic id', () => {
140136
it('get mosaicId', (done) => {

e2e/infrastructure/UnresolvedMapping.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ describe('TransactionHttp', () => {
7171
after(() => {
7272
helper.listener.close();
7373
});
74-
afterEach((done) => {
75-
// cold down
76-
setTimeout(done, 200);
77-
});
7874

7975
/**
8076
* =========================

0 commit comments

Comments
 (0)