Bug 1254 - Added unit tests
[openflowplugin.git] / openflowplugin / src / test / java / org / opendaylight / openflowplugin / openflow / md / core / SwitchConnectionHandlerImplTest.java
1 /*
2  * Copyright (c) 2014 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.openflow.md.core;
10
11 import static org.junit.Assert.assertNotNull;
12
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.openflowjava.protocol.api.connection.ConnectionAdapter;
18 import org.opendaylight.openflowplugin.api.statistics.MessageSpy;
19 import org.opendaylight.yangtools.yang.binding.DataContainer;
20
21 /**
22  * Created by Martin Bobak mbobak@cisco.com on 8/29/14.
23  */
24 @RunWith(MockitoJUnitRunner.class)
25 public class SwitchConnectionHandlerImplTest {
26
27
28     @Mock
29     private ErrorHandler errorHandler;
30     @Mock
31     private MessageSpy<DataContainer> messageSpy;
32     @Mock
33     private ConnectionAdapter connectionAdapter;
34
35     /**
36      * Test method for SwitchConnectionHandlerImpl initialization.
37      */
38     @Test
39     public void basicInitializationTest() {
40         SwitchConnectionHandlerImpl switchConnectionHandler = new SwitchConnectionHandlerImpl();
41         assertNotNull(switchConnectionHandler);
42         switchConnectionHandler.setMessageSpy(messageSpy);
43         switchConnectionHandler.setErrorHandler(errorHandler);
44     }
45
46 }