blob: fe97527e8bc393f2a34ae70a897895aa0f21847b [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 { MastComponent } from '../../../../../app/fw/mast/mast/mast.component';
Sean Condon49e15be2018-05-16 16:58:29 +010021import { IconComponent } from '../../../../../app/fw/svg/icon/icon.component';
22import { DialogService } from '../../../../../app/fw/layer/dialog.service';
23import { LionService } from '../../../../../app/fw/util/lion.service';
24import { IconService } from '../../../../../app/fw/svg/icon.service';
25import { NavService } from '../../../../../app/fw/nav/nav.service';
26import { WebSocketService } from '../../../../../app/fw/remote/websocket.service';
27
28class MockDialogService {}
29
30class MockLionService {}
31
32class MockNavService {}
33
34class MockWebSocketService {}
35
36class MockIconService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010037
38/**
39 * ONOS GUI -- Masthead Controller - Unit Tests
40 */
41describe('MastComponent', () => {
Sean Condon49e15be2018-05-16 16:58:29 +010042 let log: LogService;
Sean Condon83fc39f2018-04-19 18:56:13 +010043
Sean Condon49e15be2018-05-16 16:58:29 +010044 beforeEach(() => {
45 log = new ConsoleLoggerService();
46 TestBed.configureTestingModule({
47 declarations: [ MastComponent, IconComponent ],
48 providers: [
49 { provide: DialogService, useClass: MockDialogService },
50 { provide: LionService, useClass: MockLionService },
51 { provide: LogService, useValue: log },
52 { provide: NavService, useClass: MockNavService },
53 { provide: WebSocketService, useClass: MockWebSocketService },
54 { provide: IconService, useClass: MockIconService },
55 ]
56 });
57 });
Sean Condon83fc39f2018-04-19 18:56:13 +010058
Sean Condon49e15be2018-05-16 16:58:29 +010059 it('should create', () => {
60 const fixture = TestBed.createComponent(MastComponent);
61 const component = fixture.componentInstance;
62 expect(component).toBeTruthy();
63 });
Sean Condon83fc39f2018-04-19 18:56:13 +010064});