2 * Copyright (c) 2016 Huawei, Inc. and others. All rights reserved.
\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
8 package org.opendaylight.nemo.tool.sandbox.models;
\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
16 import static org.mockito.Mockito.*;
\r
17 import static org.junit.Assert.*;
\r
19 import static org.junit.Assert.*;
\r
22 * Created by Thomas Liu on 2016/1/14.
\r
24 public class ConnectorTest extends TestCase {
\r
26 private String nodeName;
\r
27 private Connector connectorTest;
\r
30 public void setUp() throws Exception {
\r
32 nodeName = "connector";
\r
33 connectorTest = new Connector(nodeName,order);
\r
38 public void testGetConnectorName() throws Exception {
\r
39 Assert.assertNotNull(connectorTest.getConnectorName());
\r
43 public void testGetOrder() throws Exception {
\r
44 Assert.assertNotNull(connectorTest.getOrder());
\r
48 public void testGetNodeName() throws Exception {
\r
49 Assert.assertNotNull(connectorTest.getNodeName());
\r
53 public void testEquals() throws Exception {
\r
54 Assert.assertNotNull(connectorTest.equals(this));
\r
59 public void testHashCode() throws Exception {
\r
60 Assert.assertNotNull(connectorTest.hashCode());
\r
64 public void testToString() throws Exception {
\r
65 Assert.assertNotNull(connectorTest.toString());
\r
69 public void testCompareTo() throws Exception {
\r
70 Assert.assertNotNull(connectorTest.compareTo(new Connector("connector2",5)));
\r