blob: 993430b945bf54c61ab08c19b7e783686dbeef41 [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
18import { LogService } from '../../../../app/log.service';
19import { ConsoleLoggerService } from '../../../../app/consolelogger.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010020import { SortableHeaderDirective } from '../../../../app/fw/widget/sortableheader.directive';
21import { IconService } from '../../../../app/fw/svg/icon.service';
22import { GlyphService } from '../../../../app/fw/svg/glyph.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010023import { FnService } from '../../../../app/fw/util/fn.service';
Sean Condon83fc39f2018-04-19 18:56:13 +010024
Sean Condon49e15be2018-05-16 16:58:29 +010025class MockFnService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010026
Sean Condon49e15be2018-05-16 16:58:29 +010027class MockGlyphService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010028
Sean Condon49e15be2018-05-16 16:58:29 +010029class MockIconService {}
Sean Condon83fc39f2018-04-19 18:56:13 +010030
31/**
32 * ONOS GUI -- Widget -- Table Sortable Header Directive - Unit Tests
33 */
34describe('SortableHeaderDirective', () => {
Sean Condon83fc39f2018-04-19 18:56:13 +010035 let log: LogService;
Sean Condon83fc39f2018-04-19 18:56:13 +010036
37 beforeEach(() => {
Sean Condon49e15be2018-05-16 16:58:29 +010038 log = new ConsoleLoggerService();
39
40 TestBed.configureTestingModule({
41 providers: [ SortableHeaderDirective,
42 { provide: FnService, useClass: MockFnService },
43 { provide: LogService, useValue: log },
44 { provide: GlyphService, useClass: MockGlyphService },
45 { provide: IconService, useClass: MockIconService },
46 ]
47 });
Sean Condon83fc39f2018-04-19 18:56:13 +010048 });
49
50 afterEach(() => {
51 log = null;
Sean Condon83fc39f2018-04-19 18:56:13 +010052 });
53
Sean Condon49e15be2018-05-16 16:58:29 +010054 it('should create an instance', inject([SortableHeaderDirective], (directive: SortableHeaderDirective) => {
Sean Condon83fc39f2018-04-19 18:56:13 +010055 expect(directive).toBeTruthy();
Sean Condon49e15be2018-05-16 16:58:29 +010056 }));
Sean Condon83fc39f2018-04-19 18:56:13 +010057});