Sean Condon | 83fc39f | 2018-04-19 18:56:13 +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 | import { DeviceDetailsPanelDirective } from '../../../../app/view/device/devicedetailspanel.directive'; |
| 17 | import { KeyService } from '../../../../app/fw/util/key.service'; |
| 18 | import { LogService } from '../../../../app/log.service'; |
| 19 | import { FnService } from '../../../../app/fw/util/fn.service'; |
| 20 | import { ActivatedRoute, Router} from '@angular/router'; |
| 21 | |
| 22 | class MockFunctionService extends FnService { |
| 23 | // Override things as necessary |
| 24 | } |
| 25 | |
| 26 | class MockKeyService extends KeyService { |
| 27 | // Override things as necessary |
| 28 | } |
| 29 | /** |
| 30 | * ONOS GUI -- Device View Module - Unit Tests |
| 31 | */ |
| 32 | describe('DeviceDetailsPanelDirective', () => { |
| 33 | let ar: ActivatedRoute; |
| 34 | let log: LogService; |
| 35 | let ks: KeyService; |
| 36 | let fs: MockFunctionService; |
| 37 | let window: Window |
| 38 | let directive: DeviceDetailsPanelDirective; |
| 39 | |
| 40 | beforeEach(() => { |
| 41 | log = new LogService(); |
| 42 | ar = new ActivatedRoute(); |
| 43 | fs = new MockFunctionService(ar, log); |
| 44 | ks = new MockKeyService(fs, log); |
| 45 | directive = new DeviceDetailsPanelDirective(ks, log, window); |
| 46 | }); |
| 47 | |
| 48 | afterEach(() => { |
| 49 | fs = null; |
| 50 | ks = null; |
| 51 | log = null; |
| 52 | ar = null; |
| 53 | directive = null; |
| 54 | }); |
| 55 | |
| 56 | it('should create an instance', () => { |
| 57 | expect(directive).toBeTruthy(); |
| 58 | }); |
| 59 | }); |