d7fe784e4f86ed799cd3e23d7908afbfbd86cabb
[nemo.git] / nemo-tools / sandbox / src / test / java / org / opendaylight / nemo / tool / sandbox / models / ConnectorTest.java
1 /*\r
2  * Copyright (c) 2016 Huawei, Inc. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.nemo.tool.sandbox.models;\r
9 \r
10 import junit.framework.TestCase;\r
11 import org.junit.Assert;\r
12 import org.junit.Before;\r
13 import org.junit.Test;\r
14 import org.opendaylight.nemo.tool.sandbox.models.Connector;\r
15 \r
16 import static org.mockito.Mockito.*;\r
17 import static org.junit.Assert.*;\r
18 \r
19 import static org.junit.Assert.*;\r
20 \r
21 /**\r
22  * Created by Thomas Liu on 2016/1/14.\r
23  */\r
24 public class ConnectorTest extends TestCase {\r
25     private int order;\r
26     private String nodeName;\r
27     private Connector connectorTest;\r
28 \r
29     @Before\r
30     public void setUp() throws Exception {\r
31         order = 10;\r
32         nodeName = "connector";\r
33         connectorTest = new Connector(nodeName,order);\r
34 \r
35     }\r
36 \r
37     @Test\r
38     public void testGetConnectorName() throws Exception {\r
39         Assert.assertNotNull(connectorTest.getConnectorName());\r
40     }\r
41 \r
42     @Test\r
43     public void testGetOrder() throws Exception {\r
44         Assert.assertNotNull(connectorTest.getOrder());\r
45     }\r
46 \r
47     @Test\r
48     public void testGetNodeName() throws Exception {\r
49         Assert.assertNotNull(connectorTest.getNodeName());\r
50     }\r
51 \r
52     @Test\r
53     public void testEquals() throws Exception {\r
54         Assert.assertNotNull(connectorTest.equals(this));\r
55 \r
56     }\r
57 \r
58     @Test\r
59     public void testHashCode() throws Exception {\r
60         Assert.assertNotNull(connectorTest.hashCode());\r
61     }\r
62 \r
63     @Test\r
64     public void testToString() throws Exception {\r
65         Assert.assertNotNull(connectorTest.toString());\r
66     }\r
67 \r
68     @Test\r
69     public void testCompareTo() throws Exception {\r
70         Assert.assertNotNull(connectorTest.compareTo(new Connector("connector2",5)));\r
71     }\r
72 }