blob: ff2210ce53b1a7f8451994e8ade1411f098b8f0c [file] [log] [blame]
Simon Hunt737c89f2015-01-28 12:23:19 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Simon Hunt737c89f2015-01-28 12:23:19 -08003 *
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 Event Service - Unit Tests
19 */
20describe('factory: view/topo/topoEvent.js', function() {
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070021 var $log, fs, tes, bns;
Simon Hunt737c89f2015-01-28 12:23:19 -080022
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070023 beforeEach(module('ovTopo', 'onosNav', 'onosUtil', 'onosLayer', 'ngRoute',
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070024 'onosWidget', 'onosMast'));
Simon Hunt737c89f2015-01-28 12:23:19 -080025
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070026 beforeEach(inject(function (_$log_, FnService,
27 TopoEventService, ButtonService) {
Simon Hunt737c89f2015-01-28 12:23:19 -080028 $log = _$log_;
29 fs = FnService;
30 tes = TopoEventService;
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070031 bns = ButtonService;
Simon Hunt737c89f2015-01-28 12:23:19 -080032 }));
33
Matteo Scandolo209c6c62016-05-21 10:08:57 -070034 it('should define TopoEventService', function () {
Simon Hunt737c89f2015-01-28 12:23:19 -080035 expect(tes).toBeDefined();
36 });
37
Matteo Scandolo209c6c62016-05-21 10:08:57 -070038 it('should define api functions', function () {
Simon Hunt737c89f2015-01-28 12:23:19 -080039 expect(fs.areFunctions(tes, [
Matteo Scandolo209c6c62016-05-21 10:08:57 -070040 'start', 'stop', 'bindHandlers'
Simon Hunt737c89f2015-01-28 12:23:19 -080041 ])).toBeTruthy();
42 });
43
44 // TODO: more tests...
45});