blob: 915727df318c6633971da46aeefadc9c0a9a5892 [file] [log] [blame]
chidambar babu344dc812016-05-02 19:13:10 +05301/*
2 * Copyright 2016-present 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 */
16package org.onosproject.isis.controller.impl;
17
18import org.junit.After;
19import org.junit.Before;
20import org.junit.Test;
21
22import static org.hamcrest.CoreMatchers.is;
23import static org.hamcrest.CoreMatchers.notNullValue;
24import static org.junit.Assert.assertThat;
25
26/**
27 * Unit test case for DefaultIsisController.
28 */
29public class DefaultIsisControllerTest {
30 private DefaultIsisController defaultIsisController;
31
32 @Before
33 public void setUp() throws Exception {
34 defaultIsisController = new DefaultIsisController();
35 }
36
37 @After
38 public void tearDown() throws Exception {
39 defaultIsisController = null;
40 }
41
42 /**
43 * Tests activate() method.
44 */
45 @Test
46 public void testActivate() throws Exception {
47 defaultIsisController.activate();
48 assertThat(defaultIsisController, is(notNullValue()));
49 }
50
51 /**
52 * Tests deactivate() method.
53 */
54 @Test(expected = Exception.class)
55 public void testDeactivate() throws Exception {
56 defaultIsisController.activate();
57 defaultIsisController.deactivate();
58 assertThat(defaultIsisController, is(notNullValue()));
59 }
60
61 /**
62 * Tests allConfiguredProcesses() method.
63 */
64 @Test
65 public void testAllConfiguredProcesses() throws Exception {
66 defaultIsisController.allConfiguredProcesses();
67 assertThat(defaultIsisController, is(notNullValue()));
68 }
69}