blob: 80f8d5a59b65e954c1afc33405c8d195781bcc5d [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 { TestBed, inject } 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 { DetailsPanelService } from '../../../../app/fw/layer/detailspanel.service';
Sean Condon49e15be2018-05-16 16:58:29 +010021import { EditableTextService } from '../../../../app/fw/layer/editabletext.service';
22import { FnService } from '../../../../app/fw/util/fn.service';
23import { IconService } from '../../../../app/fw/svg/icon.service';
24import { MastService } from '../../../../app/fw/mast/mast.service';
25import { PanelService } from '../../../../app/fw/layer/panel.service';
26import { WebSocketService } from '../../../../app/fw/remote/websocket.service';
27
28class MockEditableTextService {}
29
30class MockIconService {}
31
32class MockFnService {}
33
34class MockMastService {}
35
36class MockPanelService {}
37
38class MockWebSocketService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010039
40/**
41 * ONOS GUI -- Layer -- Details Panel Service - Unit Tests
42 */
43describe('DetailsPanelService', () => {
Sean Condon49e15be2018-05-16 16:58:29 +010044 let log: LogService;
Sean Condon83fc39f2018-04-19 18:56:13 +010045
Sean Condon49e15be2018-05-16 16:58:29 +010046 beforeEach(() => {
47 log = new ConsoleLoggerService();
48
49 TestBed.configureTestingModule({
50 providers: [DetailsPanelService,
51 { provide: EditableTextService, useClass: MockEditableTextService },
52 { provide: FnService, useClass: MockFnService },
53 { provide: IconService, useClass: MockIconService },
54 { provide: LogService, useValue: log },
55 { provide: MastService, useClass: MockMastService },
56 { provide: PanelService, useClass: MockPanelService },
57 { provide: WebSocketService, useClass: MockWebSocketService },
58 ]
59 });
60 });
61
62 it('should be created', inject([DetailsPanelService], (service: DetailsPanelService) => {
63 expect(service).toBeTruthy();
64 }));
Sean Condon83fc39f2018-04-19 18:56:13 +010065});