blob: 8d86c804038b1cbd6ba8266738a1a30537a71496 [file] [log] [blame]
Sean Condon83fc39f2018-04-19 18:56:13 +01001/*
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 */
16import { async, ComponentFixture, TestBed } from '@angular/core/testing';
17
Sean Condon49e15be2018-05-16 16:58:29 +010018import { LogService } from '../../../../../app/log.service';
19import { ConsoleLoggerService } from '../../../../../app/consolelogger.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010020import { NavComponent } from '../../../../../app/fw/nav/nav/nav.component';
Sean Condon49e15be2018-05-16 16:58:29 +010021import { IconComponent } from '../../../../../app/fw/svg/icon/icon.component';
22import { IconService } from '../../../../../app/fw/svg/icon.service';
23import { NavService } from '../../../../../app/fw/nav/nav.service';
24
25class MockNavService {}
26
27class MockIconService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010028
29/**
30 * ONOS GUI -- Util -- Navigation Component - Unit Tests
31 */
32describe('NavComponent', () => {
Sean Condon49e15be2018-05-16 16:58:29 +010033 let log: LogService;
Sean Condon83fc39f2018-04-19 18:56:13 +010034
Sean Condon49e15be2018-05-16 16:58:29 +010035 beforeEach(() => {
36 log = new ConsoleLoggerService();
37 TestBed.configureTestingModule({
38 declarations: [ NavComponent, IconComponent ],
39 providers: [
40 { provide: LogService, useValue: log },
41 { provide: IconService, useClass: MockIconService },
42 { provide: NavService, useClass: MockNavService },
43 ]
44 });
45 });
Sean Condon83fc39f2018-04-19 18:56:13 +010046
Sean Condon49e15be2018-05-16 16:58:29 +010047 it('should create', () => {
48 const fixture = TestBed.createComponent(NavComponent);
49 const component = fixture.componentInstance;
50 expect(component).toBeTruthy();
51 });
Sean Condon83fc39f2018-04-19 18:56:13 +010052});