forked from Infosys/Discourse-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.module.ts
More file actions
61 lines (59 loc) · 1.71 KB
/
test.module.ts
File metadata and controls
61 lines (59 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { DatePipe } from '@angular/common';
import { ActivatedRoute, Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { SessionStorageService, LocalStorageService } from 'ngx-webstorage';
import { JhiDataUtils, JhiDateUtils, JhiEventManager, JhiAlertService, JhiParseLinks } from 'ng-jhipster';
import { AccountService } from 'app/core/auth/account.service';
import { MockAccountService } from './helpers/mock-account.service';
import { MockActivatedRoute, MockRouter } from './helpers/mock-route.service';
import { MockActiveModal } from './helpers/mock-active-modal.service';
import { MockAlertService } from './helpers/mock-alert.service';
import { MockEventManager } from './helpers/mock-event-manager.service';
@NgModule({
providers: [
DatePipe,
JhiDataUtils,
JhiDateUtils,
JhiParseLinks,
{
provide: JhiEventManager,
useClass: MockEventManager,
},
{
provide: NgbActiveModal,
useClass: MockActiveModal,
},
{
provide: ActivatedRoute,
useValue: new MockActivatedRoute({ id: 123 }),
},
{
provide: Router,
useClass: MockRouter,
},
{
provide: AccountService,
useClass: MockAccountService,
},
{
provide: JhiAlertService,
useClass: MockAlertService,
},
{
provide: NgbModal,
useValue: null,
},
{
provide: SessionStorageService,
useValue: null,
},
{
provide: LocalStorageService,
useValue: null,
},
],
imports: [HttpClientTestingModule],
})
export class DiscourseTestModule {}