當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript sijil.SijilModule類代碼示例

本文整理匯總了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();
 }));
開發者ID:entcore,項目名稱:entcore,代碼行數:29,代碼來源:group-card.component.spec.ts

示例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;
 }));
開發者ID:entcore,項目名稱:entcore,代碼行數:17,代碼來源:group-users-list.component.spec.ts

示例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;
    }));
開發者ID:entcore,項目名稱:entcore,代碼行數:20,代碼來源:user-manualgroups-section.component.spec.ts

示例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}}"
     });
 });
開發者ID:entcore,項目名稱:entcore,代碼行數:20,代碼來源:group-name.service.spec.ts

示例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();
    }));
開發者ID:entcore,項目名稱:entcore,代碼行數:39,代碼來源:user-communication.component.spec.ts

示例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);
    }));
開發者ID:entcore,項目名稱:entcore,代碼行數:23,代碼來源:user-info-section.component.spec.ts

示例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);
 }));
開發者ID:entcore,項目名稱:entcore,代碼行數:24,代碼來源:group-create.component.spec.ts


注:本文中的sijil.SijilModule類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。