本文整理匯總了TypeScript中sijil.SijilModule類的典型用法代碼示例。如果您正苦於以下問題:TypeScript SijilModule類的具體用法?TypeScript SijilModule怎麽用?TypeScript SijilModule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SijilModule類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
beforeEach(async(() => {
communicationRulesService = jasmine.createSpyObj('CommunicationRulesService', ['toggleInternalCommunicationRule']);
notifyService = jasmine.createSpyObj('NotifyService', ['success', 'error']);
groupNameService = jasmine.createSpyObj('GroupNameService', ['getGroupName']);
spinnerService = jasmine.createSpyObj('SpinnerService', ['perform']);
activatedRoute = {root: {firstChild: {firstChild: {}}}} as ActivatedRoute;
TestBed.configureTestingModule({
declarations: [
GroupCardComponent
],
providers: [
{useValue: communicationRulesService, provide: CommunicationRulesService},
{useValue: spinnerService, provide: SpinnerService},
{useValue: notifyService, provide: NotifyService},
{useValue: groupNameService, provide: GroupNameService},
{useValue: activatedRoute, provide: ActivatedRoute}
],
imports: [
SijilModule.forRoot(),
UxModule.forRoot(null)
]
}).compileComponents();
fixture = TestBed.createComponent(GroupCardComponent);
component = fixture.debugElement.componentInstance;
component.group = generateGroup('Elèves du Lycée Paul Martin');
(groupNameService.getGroupName as jasmine.Spy).and.returnValue('Elèves du Lycée Paul Martin');
component.active = true;
fixture.detectChanges();
}));
示例2: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
GroupUsersList
],
providers: [
{provide: UserListService, useValue: mockUserListService},
{provide: Router, useValue: mockRouter}
],
imports: [
SijilModule.forRoot(),
UxModule.forRoot(null)
]
}).compileComponents();
fixture = TestBed.createComponent(GroupUsersList);
component = fixture.debugElement.componentInstance;
}));
示例3: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
UserManualGroupsSection
],
providers: [
{provide: NotifyService, useValue: mockNotifyService},
{provide: SpinnerService, useValue: mockSpinnerService},
{provide: ChangeDetectorRef, useValue: mockChangeDetectorRef}
],
imports: [
SijilModule.forRoot(),
UxModule.forRoot(null),
FormsModule
]
}).compileComponents();
fixture = TestBed.createComponent(UserManualGroupsSection);
component = fixture.debugElement.componentInstance;
}));
示例4: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [GroupNameService],
imports: [SijilModule.forRoot()]
});
groupNameService = TestBed.get(GroupNameService);
const bundlesService = TestBed.get(BundlesService);
bundlesService.addToBundle({
"group.card.structure.Personnel": "Personnels de {{name}}",
"group.card.structure.Relative": "Parents de {{name}}",
"group.card.structure.Student": "Élèves de {{name}}",
"group.card.structure.Teacher": "Enseignants de {{name}}",
"group.card.structure.Guest": "Invités de {{name}}",
"group.card.class.Personnel": "Personnels de la classe {{name}}",
"group.card.class.Relative": "Parents de la classe {{name}}",
"group.card.class.Student": "Élèves de la classe {{name}}",
"group.card.class.Teacher": "Enseignants de la classe {{name}}",
"group.card.class.Guest": "Invités de la classe {{name}}"
});
});
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
UserCommunicationComponent,
MockCommunicationRulesComponent
],
providers: [],
imports: [
SijilModule.forRoot(),
UxModule.forRoot(null)
]
}).compileComponents();
fixture = TestBed.createComponent(UserCommunicationComponent);
component = fixture.debugElement.componentInstance;
const bundlesService = TestBed.get(BundlesService);
bundlesService.addToBundle({
"user.communication.back-to-user-details": "Retour à la fiche",
"user.communication.title": "Communication de {{ lastName }} {{ firstName }}"
});
axellePotier = generateTestingData(
'Axelle',
'Potier',
[generateGroup('c1')],
[generateGroup('groupf1'), generateGroup('groupf2')],
[generateGroup('groupm1')]);
harryPotter = generateTestingData(
'Harry',
'Potter',
[generateGroup('c1')],
null,
null);
component.user = axellePotier.user;
component.userSendingCommunicationRules = axellePotier.communicationRules;
component.addCommunicationPickableGroups = [generateGroup('group1')];
fixture.detectChanges();
}));
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
UserInfoSection
],
providers: [
{provide: NotifyService, useValue: mockNotifyService},
{provide: SpinnerService, useValue: mockSpinnerService},
{provide: ChangeDetectorRef, useValue: mockChangeDetectorRef},
{provide: UserInfoService, useValue: mockUserInfoService}
],
imports: [
HttpClientTestingModule,
SijilModule.forRoot(),
UxModule.forRoot(null),
FormsModule
]
}).compileComponents();
fixture = TestBed.createComponent(UserInfoSection);
component = fixture.debugElement.componentInstance;
httpController = TestBed.get(HttpTestingController);
}));
示例7: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
GroupCreate
],
providers: [
{provide: GroupsStore, useValue: mockGroupsStore},
{provide: NotifyService, useValue: mockNotifyService},
{provide: SpinnerService, useValue: mockSpinnerService},
{provide: Router, useValue: mockRouter},
{provide: ActivatedRoute, useValue: {params: convertToParamMap({})}},
{provide: Location, useValue: mockLocation}
],
imports: [
HttpClientTestingModule,
SijilModule.forRoot(),
UxModule.forRoot(null),
FormsModule
]
}).compileComponents();
fixture = TestBed.createComponent(GroupCreate);
component = fixture.debugElement.componentInstance;
httpController = TestBed.get(HttpTestingController);
}));