blob: c8c051c915e123e0cac400622232d11855d3497f [file] [log] [blame]
Simon Hunt08f841d02015-02-10 14:39:20 -08001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16
17/*
18 ONOS GUI -- Topo View -- Topo Selection Service - Unit Tests
19 */
20describe('factory: view/topo/topoSelect.js', function() {
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070021 var $log, fs, tss, bns;
Simon Hunt08f841d02015-02-10 14:39:20 -080022
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070023 beforeEach(module('ovTopo', 'onosUtil', 'onosLayer', 'ngRoute', 'onosNav',
24 'onosWidget'));
Simon Hunt08f841d02015-02-10 14:39:20 -080025
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070026 beforeEach(inject(function (_$log_, FnService,
27 TopoSelectService, ButtonService) {
Simon Hunt08f841d02015-02-10 14:39:20 -080028 $log = _$log_;
29 fs = FnService;
30 tss = TopoSelectService;
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070031 bns = ButtonService;
Simon Hunt08f841d02015-02-10 14:39:20 -080032 }));
33
34 it('should define TopoSelectService', function () {
35 expect(tss).toBeDefined();
36 });
37
38 it('should define api functions', function () {
39 expect(fs.areFunctions(tss, [
Simon Hunt3074fb22015-03-31 15:06:25 -070040 'initSelect', 'destroySelect',
41 'showDetails',
Simon Hunt08f841d02015-02-10 14:39:20 -080042 'nodeMouseOver', 'nodeMouseOut', 'selectObject', 'deselectObject',
Simon Hunt3074fb22015-03-31 15:06:25 -070043 'deselectAll',
44 'hovered', 'selectOrder',
45 'validateSelectionContext',
46 'clickConsumed'
Simon Hunt08f841d02015-02-10 14:39:20 -080047 ])).toBeTruthy();
48 });
49
50 // TODO: more tests...
51});