2017-04-15 19:04:49 +02:00
|
|
|
import {AppComponent} from './app.component';
|
|
|
|
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
2017-07-25 22:09:21 +02:00
|
|
|
import {FormsModule} from '@angular/forms';
|
2018-08-31 22:56:18 +02:00
|
|
|
import {InputComponentManagerService} from './input-component-manager.service';
|
2017-04-15 19:04:49 +02:00
|
|
|
import {Step} from './step';
|
2018-08-31 22:53:50 +02:00
|
|
|
import {ConverterRegistryService} from './converter-registry.service';
|
2017-11-07 23:53:36 +01:00
|
|
|
import {Converter} from './converter/converter';
|
2017-04-08 00:24:44 +02:00
|
|
|
|
|
|
|
describe('AppComponent', () => {
|
2017-04-15 18:13:58 +02:00
|
|
|
let sut: AppComponent;
|
|
|
|
let fixture: ComponentFixture<AppComponent>;
|
|
|
|
const firstStep: Step = new Step(0);
|
|
|
|
|
|
|
|
const inputComponentManagerServiceStub = {
|
|
|
|
getFirst: () => {
|
|
|
|
return firstStep;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-11-07 23:53:36 +01:00
|
|
|
const converterRegistryServiceStub = {
|
|
|
|
getAllConverters: (): Converter[] => {
|
|
|
|
return [];
|
|
|
|
},
|
|
|
|
|
|
|
|
getConverter: (id: string): Converter => {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-04-08 00:24:44 +02:00
|
|
|
beforeEach(async(() => {
|
2017-04-15 18:13:58 +02:00
|
|
|
/*return */
|
2017-04-08 00:24:44 +02:00
|
|
|
TestBed.configureTestingModule({
|
2017-04-15 18:13:58 +02:00
|
|
|
declarations: [AppComponent],
|
2017-07-25 22:09:21 +02:00
|
|
|
imports: [FormsModule],
|
2017-11-07 23:53:36 +01:00
|
|
|
providers: [
|
|
|
|
{provide: InputComponentManagerService, useValue: inputComponentManagerServiceStub},
|
|
|
|
{provide: ConverterRegistryService, useValue: converterRegistryServiceStub}
|
|
|
|
]
|
2017-04-15 18:13:58 +02:00
|
|
|
})
|
|
|
|
.compileComponents();
|
2017-04-08 00:24:44 +02:00
|
|
|
}));
|
|
|
|
|
2017-04-15 18:13:58 +02:00
|
|
|
beforeEach(() => {
|
|
|
|
fixture = TestBed.createComponent(AppComponent);
|
|
|
|
sut = fixture.componentInstance;
|
|
|
|
});
|
|
|
|
|
2017-11-07 23:53:36 +01:00
|
|
|
it('should create the app', async(() => {
|
|
|
|
// const fixture = TestBed.createComponent(AppComponent);
|
|
|
|
const app = fixture.debugElement.componentInstance;
|
|
|
|
expect(app).toBeTruthy();
|
|
|
|
}));
|
2017-04-08 00:24:44 +02:00
|
|
|
});
|