Sean Condon | fd6d11b | 2018-06-02 20:29:49 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | ONOS GUI -- Layer -- Veil Service - Unit Tests |
| 19 | */ |
| 20 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
| 21 | |
| 22 | import { VeilComponent } from './veil.component'; |
| 23 | import { ConsoleLoggerService } from '../../../consolelogger.service'; |
| 24 | import { LogService } from '../../../log.service'; |
| 25 | import { KeyService } from '../../util/key.service'; |
| 26 | import { GlyphService } from '../../svg/glyph.service'; |
| 27 | |
| 28 | class MockKeyService {} |
| 29 | |
| 30 | class MockGlyphService {} |
| 31 | |
| 32 | describe('VeilComponent', () => { |
| 33 | let log: LogService; |
| 34 | |
| 35 | beforeEach(() => { |
| 36 | log = new ConsoleLoggerService(); |
| 37 | |
| 38 | TestBed.configureTestingModule({ |
| 39 | declarations: [ VeilComponent ], |
| 40 | providers: [ |
| 41 | { provide: LogService, useValue: log }, |
| 42 | { provide: KeyService, useClass: MockKeyService }, |
| 43 | { provide: GlyphService, useClass: MockGlyphService }, |
| 44 | ] |
| 45 | }); |
| 46 | }); |
| 47 | |
| 48 | it('should create', () => { |
| 49 | const fixture = TestBed.createComponent(VeilComponent); |
| 50 | const component = fixture.componentInstance; |
| 51 | expect(component).toBeTruthy(); |
| 52 | }); |
| 53 | }); |