2 * Copyright (c) 2015 Inocybe and others. All rights reserved.
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
9 package org.opendaylight.ovsdb.openstack.netvirt;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertNotNull;
13 import static org.junit.Assert.assertTrue;
15 import org.junit.Before;
16 import org.junit.Test;
17 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
20 * Unit test for {@link NodeCacheManagerEvent}
22 public class NodeCacheManagerEventTest {
24 private NodeCacheManagerEvent nodeCacheManagerEvent;
28 nodeCacheManagerEvent = new NodeCacheManagerEvent("nodeIdentifier", Action.ADD);
32 public void testToString() {
33 assertEquals("Error, toString() did not return the correct string", "NodeCacheManagerEvent [action=ADD, nodeIdentifier=nodeIdentifier]", nodeCacheManagerEvent.toString());
37 public void testHashCode() {
38 assertNotNull("Error, hashCode shouldn't be null", nodeCacheManagerEvent.hashCode());
42 public void testEquals() {
43 assertTrue("Error, the two object should be equal", nodeCacheManagerEvent.equals(nodeCacheManagerEvent));
44 assertFalse("Error, the two object should not be equal", nodeCacheManagerEvent.equals(new String("dummy")));