2 * ========================LICENSE_START=================================
5 * Copyright (C) 2019 Nordix Foundation
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ========================LICENSE_END===================================
20 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
21 import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
22 import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
23 import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
24 import { MatIconModule } from '@angular/material/icon';
25 import { MatTableModule } from '@angular/material/table';
27 import { EICoordinatorComponent } from './ei-coordinator.component';
28 import { EIJobDataSource } from './ei-job.datasource';
29 import { EIProducerDataSource } from './ei-producer.datasource';
30 import { UiService } from '../services/ui/ui.service';
32 describe('EICoordinatorComponent', () => {
33 let component: EICoordinatorComponent;
34 let fixture: ComponentFixture<EICoordinatorComponent>;
36 beforeEach(async(() => {
37 const jobDataSourceSpy = jasmine.createSpyObj('EIJobDataSource', [ 'loadJobs', 'eiJobs' ]);
38 const producerDataSourceSpy = jasmine.createSpyObj('EIProducerDataSource', [ 'loadProducers', 'eiProducers' ]);
40 jobDataSourceSpy.eiJobs.and.returnValue([]);
42 producerDataSourceSpy.eiProducers.and.returnValue([]);
44 TestBed.configureTestingModule({
48 BrowserAnimationsModule,
52 CUSTOM_ELEMENTS_SCHEMA
55 EICoordinatorComponent
58 { provide: EIJobDataSource, useValue: jobDataSourceSpy },
59 { provide: EIProducerDataSource, useValue: producerDataSourceSpy },
68 fixture = TestBed.createComponent(EICoordinatorComponent);
69 component = fixture.componentInstance;
70 fixture.detectChanges();
73 it('should create', () => {
74 expect(component).toBeTruthy();