blob: 3fa6fe0f608781818a6ab4cadf98a0885495e4df [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 */
Sean Condon49e15be2018-05-16 16:58:29 +010016import { TestBed, inject } from '@angular/core/testing';
17
Sean Condon83fc39f2018-04-19 18:56:13 +010018import { TableResizeDirective } from '../../../../app/fw/widget/tableresize.directive';
19import { LogService } from '../../../../app/log.service';
Sean Condon49e15be2018-05-16 16:58:29 +010020import { ConsoleLoggerService } from '../../../../app/consolelogger.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010021import { FnService } from '../../../../app/fw/util/fn.service';
22import { MastService } from '../../../../app/fw/mast/mast.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010023
Sean Condon49e15be2018-05-16 16:58:29 +010024class MockFnService {}
25
26class MockMastService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010027
28/**
29 * ONOS GUI -- Widget -- Table Resize Directive - Unit Tests
30 */
31describe('TableResizeDirective', () => {
Sean Condon83fc39f2018-04-19 18:56:13 +010032 let log: LogService;
Sean Condon83fc39f2018-04-19 18:56:13 +010033
34 beforeEach(() => {
Sean Condon49e15be2018-05-16 16:58:29 +010035 log = new ConsoleLoggerService();
36
37 TestBed.configureTestingModule({
38 providers: [ TableResizeDirective,
39 { provide: FnService, useClass: MockFnService },
40 { provide: LogService, useValue: log },
41 { provide: MastService, useClass: MockMastService },
42 ]
43 });
Sean Condon83fc39f2018-04-19 18:56:13 +010044 });
45
46 afterEach(() => {
Sean Condon83fc39f2018-04-19 18:56:13 +010047 log = null;
Sean Condon83fc39f2018-04-19 18:56:13 +010048 });
49
Sean Condon49e15be2018-05-16 16:58:29 +010050 it('should create an instance', inject([TableResizeDirective], (directive: TableResizeDirective) => {
Sean Condon83fc39f2018-04-19 18:56:13 +010051 expect(directive).toBeTruthy();
Sean Condon49e15be2018-05-16 16:58:29 +010052 }));
Sean Condon83fc39f2018-04-19 18:56:13 +010053});