Bug 5596 Cleaning part 1
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / device / DeviceStateImplTest.java
1 /**
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.impl.device;
10
11 import org.junit.Assert;
12 import org.junit.Before;
13 import org.junit.Test;
14 import org.junit.runner.RunWith;
15 import org.mockito.Mock;
16 import org.mockito.runners.MockitoJUnitRunner;
17 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
18
19 /**
20  * openflowplugin-impl
21  * org.opendaylight.openflowplugin.impl.device
22  *
23  * test of {@link DeviceStateImpl} - lightweight version, using basic ways (TDD)
24  */
25 @RunWith(MockitoJUnitRunner.class)
26 public class DeviceStateImplTest {
27
28     @Mock
29     private DeviceInfo deviceInfo;
30
31     private DeviceStateImpl deviceState;
32
33     @Before
34     public void initialization() {
35         deviceState = new DeviceStateImpl();
36     }
37
38     @Test
39     public void testStatPollEnabled_initialValue(){
40         Assert.assertFalse(deviceState.isStatisticsPollingEnabled());
41     }
42
43     @Test
44     public void testStatistics_initialValue(){
45         Assert.assertFalse(deviceState.isFlowStatisticsAvailable());
46         Assert.assertFalse(deviceState.isPortStatisticsAvailable());
47         Assert.assertFalse(deviceState.isQueueStatisticsAvailable());
48         Assert.assertFalse(deviceState.isTableStatisticsAvailable());
49     }
50
51     @Test
52     public void testMeterAndGroupAvailable_initialValue(){
53         Assert.assertFalse(deviceState.isGroupAvailable());
54         Assert.assertFalse(deviceState.isMetersAvailable());
55     }
56
57 }