Fix naming, add tests #5
					 1 changed files with 6 additions and 16 deletions
				
			
		|  | @ -4,32 +4,22 @@ import {FormsModule} from '@angular/forms'; | ||||||
| import {InputComponentManagerService} from './input-component-manager.service'; | import {InputComponentManagerService} from './input-component-manager.service'; | ||||||
| import {Step} from './step'; | import {Step} from './step'; | ||||||
| import {ConverterRegistryService} from './converter-registry.service'; | import {ConverterRegistryService} from './converter-registry.service'; | ||||||
| import {Converter} from './converter/converter'; |  | ||||||
| import {VersionComponent} from './version/version.component'; | import {VersionComponent} from './version/version.component'; | ||||||
|  | import createSpyObj = jasmine.createSpyObj; | ||||||
| 
 | 
 | ||||||
| describe('AppComponent', () => { | describe('AppComponent', () => { | ||||||
|   let sut: AppComponent; |   let sut: AppComponent; | ||||||
|   let fixture: ComponentFixture<AppComponent>; |   let fixture: ComponentFixture<AppComponent>; | ||||||
|   const firstStep: Step = new Step(0); |   const firstStep: Step = new Step(0); | ||||||
| 
 | 
 | ||||||
|   const inputComponentManagerServiceStub = { |   const inputComponentManagerServiceStub = createSpyObj(['getFirst']); | ||||||
|     getFirst: () => { |   inputComponentManagerServiceStub.getFirst.and.returnValue(firstStep); | ||||||
|       return firstStep; |  | ||||||
|     } |  | ||||||
|   }; |  | ||||||
| 
 | 
 | ||||||
|   const converterRegistryServiceStub = { |   const converterRegistryServiceStub = createSpyObj(['getAllConverters', 'getConverter']); | ||||||
|     getAllConverters: (): Converter[] => { |   converterRegistryServiceStub.getAllConverters.and.returnValue([]); | ||||||
|       return []; |   converterRegistryServiceStub.getConverter.and.returnValue(undefined); | ||||||
|     }, |  | ||||||
| 
 |  | ||||||
|     getConverter: (id: string): Converter => { |  | ||||||
|       return undefined; |  | ||||||
|     } |  | ||||||
|   }; |  | ||||||
| 
 | 
 | ||||||
|   beforeEach(async(() => { |   beforeEach(async(() => { | ||||||
|     /*return */ |  | ||||||
|     TestBed.configureTestingModule({ |     TestBed.configureTestingModule({ | ||||||
|       declarations: [AppComponent, VersionComponent], |       declarations: [AppComponent, VersionComponent], | ||||||
|       imports: [FormsModule], |       imports: [FormsModule], | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue