Skip to content

Commit f21466d

Browse files
author
Fernando Leal
committed
versão 0.6.0-alpha.2 angular 9
1 parent 88bd2cf commit f21466d

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

src/app/batch.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
// } as Cliente;
6262

6363
// it('batch simple', async () => {
64-
// const database: Database = TestBed.get(Database);
64+
// const database: Database = TestBed.inject(Database);
6565

6666
// console.log('database ::: ', database);
6767

@@ -91,7 +91,7 @@
9191
// });
9292

9393
// // it('Test transaction mapper insert T', async () => {
94-
// // const database: Database = TestBed.get(Database);
94+
// // const database: Database = TestBed.inject(Database);
9595
// // const rollback = () => {
9696
// // database.rollbackTransaction().toPromise().then().catch();
9797
// // };

src/app/cidade.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Cidade', () => {
3737
}));
3838

3939
it('insert', async () => {
40-
const database: Database = TestBed.get(Database);
40+
const database: Database = TestBed.inject(Database);
4141
expect(database).toBeTruthy();
4242
const crud = await database.crud().toPromise();
4343

@@ -51,7 +51,7 @@ describe('Cidade', () => {
5151
});
5252

5353
it('update', async () => {
54-
const database: Database = TestBed.get(Database);
54+
const database: Database = TestBed.inject(Database);
5555
expect(database).toBeTruthy();
5656
const crud = await database.crud().toPromise();
5757

@@ -71,7 +71,7 @@ describe('Cidade', () => {
7171
});
7272

7373
it('read', async () => {
74-
const database: Database = TestBed.get(Database);
74+
const database: Database = TestBed.inject(Database);
7575
expect(database).toBeTruthy();
7676
const crud = await database.crud().toPromise();
7777

src/app/managed-transaction.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ describe('ManagedTransaction', () => {
4141
}));
4242

4343
afterEach(async () => {
44-
const database: Database = TestBed.get(Database);
44+
const database: Database = TestBed.inject(Database);
4545
expect(database).toBeTruthy();
4646

4747
const crud = await database.crud().toPromise();
4848
await crud.delete(GuidClazz).execute().toPromise();
4949
});
5050

5151
it('Transaction Test', async () => {
52-
const database: Database = TestBed.get(Database);
52+
const database: Database = TestBed.inject(Database);
5353
expect(database).toBeTruthy();
5454

5555
const crud = await database.crud().toPromise();
@@ -64,7 +64,7 @@ describe('ManagedTransaction', () => {
6464
});
6565

6666
it('Transaction Simple', async () => {
67-
const database: Database = TestBed.get(Database);
67+
const database: Database = TestBed.inject(Database);
6868
expect(database).toBeTruthy();
6969

7070
const transaction = await database.managedTransaction().toPromise();
@@ -106,7 +106,7 @@ describe('ManagedTransaction', () => {
106106
});
107107

108108
it('Transaction inactive', async () => {
109-
const database: Database = TestBed.get(Database);
109+
const database: Database = TestBed.inject(Database);
110110
expect(database).toBeTruthy();
111111

112112
const transaction = await database.managedTransaction().toPromise();
@@ -130,7 +130,7 @@ describe('ManagedTransaction', () => {
130130
});
131131

132132
it('Transaction get guid id', async () => {
133-
const database: Database = TestBed.get(Database);
133+
const database: Database = TestBed.inject(Database);
134134
expect(database).toBeTruthy();
135135

136136
const transaction = await database.managedTransaction().toPromise();
@@ -155,7 +155,7 @@ describe('ManagedTransaction', () => {
155155
});
156156

157157
it('Transaction_error', async () => {
158-
const database: Database = TestBed.get(Database);
158+
const database: Database = TestBed.inject(Database);
159159
expect(database).toBeTruthy();
160160

161161
const transaction = await database.managedTransaction().toPromise();
@@ -197,7 +197,7 @@ describe('ManagedTransaction', () => {
197197
});
198198

199199
it('Transaction rollback', async () => {
200-
const database: Database = TestBed.get(Database);
200+
const database: Database = TestBed.inject(Database);
201201
expect(database).toBeTruthy();
202202

203203
const transaction = await database.managedTransaction().toPromise();
@@ -231,7 +231,7 @@ describe('ManagedTransaction', () => {
231231
* OK
232232
*/
233233
it('Transaction deny query', async () => {
234-
const database: Database = TestBed.get(Database);
234+
const database: Database = TestBed.inject(Database);
235235
expect(database).toBeTruthy();
236236

237237
const transaction = await database.managedTransaction().toPromise();

src/app/migration-test.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('Migration test', () => {
6464
} as Cliente;
6565

6666
it('Test mapper insert T', async () => {
67-
const migrationFlow: MigrationFlowService = TestBed.get(MigrationFlowService);
67+
const migrationFlow: MigrationFlowService = TestBed.inject(MigrationFlowService);
6868

6969
let wasStarted: boolean = false;
7070
migrationFlow.$statusEvent.subscribe((status: MigrationStatus) => {
@@ -74,7 +74,7 @@ describe('Migration test', () => {
7474
// console.log(`update status: ${status === MigrationStatus.Started ? 'Started' : 'Finished'}`);
7575
});
7676

77-
const database: Database = TestBed.get(Database);
77+
const database: Database = TestBed.inject(Database);
7878

7979
expect(migrationFlow.status).toBeUndefined();
8080
const crud = await database.crud().toPromise();

src/app/simple.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('Simple Test injector component', () => {
6262
} as Cliente;
6363

6464
it('Test mapper insert T', async () => {
65-
const database: Database = TestBed.get(Database);
65+
const database: Database = TestBed.inject(Database);
6666
const crud = await database.crud().toPromise();
6767

6868
await crud.delete(Cliente).execute().toPromise();
@@ -86,7 +86,7 @@ describe('Simple Test injector component', () => {
8686
});
8787

8888
it('Test transaction mapper insert T', async () => {
89-
const database: Database = TestBed.get(Database);
89+
const database: Database = TestBed.inject(Database);
9090
const crud = await database.crud().toPromise();
9191
const result = crud.insert(Cliente, { toSave: clienteToSave }).compile();
9292
expect(result[0].params.toString()).toEqual([

src/app/single-transaction-manager.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('Single Transaction Manager', () => {
4444
}));
4545

4646
afterEach(async(async () => {
47-
const database: Database = TestBed.get(Database);
47+
const database: Database = TestBed.inject(Database);
4848
expect(database).toBeTruthy();
4949

5050
const crud = await database.crud().toPromise();
@@ -54,7 +54,7 @@ describe('Single Transaction Manager', () => {
5454
}));
5555

5656
it('Check execute multiple transaction sequentially', async () => {
57-
const database: Database = TestBed.get(Database);
57+
const database: Database = TestBed.inject(Database);
5858
expect(database).toBeTruthy();
5959

6060
const crud = await database.crud().toPromise();

src/app/uf.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Uf', () => {
3838
}));
3939

4040
it('insert', async () => {
41-
const database: Database = TestBed.get(Database);
41+
const database: Database = TestBed.inject(Database);
4242
expect(database).toBeTruthy();
4343
const crud = await database.crud().toPromise();
4444

@@ -52,7 +52,7 @@ describe('Uf', () => {
5252
});
5353

5454
it('update', async () => {
55-
const database: Database = TestBed.get(Database);
55+
const database: Database = TestBed.inject(Database);
5656
expect(database).toBeTruthy();
5757
const crud = await database.crud().toPromise();
5858

@@ -72,7 +72,7 @@ describe('Uf', () => {
7272
});
7373

7474
it('read', async () => {
75-
const database: Database = TestBed.get(Database);
75+
const database: Database = TestBed.inject(Database);
7676
expect(database).toBeTruthy();
7777
const crud = await database.crud().toPromise();
7878

0 commit comments

Comments
 (0)