netconf-api simple unit test added 87/45887/3
authorRudolf Brisuda <rudolf.brisuda@pantheon.tech>
Tue, 20 Sep 2016 13:09:46 +0000 (15:09 +0200)
committerTomas Cere <tcere@cisco.com>
Thu, 22 Sep 2016 08:44:17 +0000 (08:44 +0000)
Change-Id: I2bd0e90a1590b65a88bdb3629c1737066fb8bdb8
Signed-off-by: Rudolf Brisuda <rudolf.brisuda@pantheon.tech>
netconf/netconf-api/src/test/java/org/opendaylight/netconf/api/monitoring/SessionEventTest.java [new file with mode: 0644]

diff --git a/netconf/netconf-api/src/test/java/org/opendaylight/netconf/api/monitoring/SessionEventTest.java b/netconf/netconf-api/src/test/java/org/opendaylight/netconf/api/monitoring/SessionEventTest.java
new file mode 100644 (file)
index 0000000..da4e4b2
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.netconf.api.monitoring;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import org.junit.Test;
+
+public class SessionEventTest {
+
+    @Test
+    public void test() {
+        final NetconfManagementSession session = mock(NetconfManagementSession.class);
+
+        assertEquals(SessionEvent.Type.IN_RPC_FAIL, SessionEvent.inRpcFail(session).getType());
+        assertEquals(SessionEvent.Type.IN_RPC_SUCCESS, SessionEvent.inRpcSuccess(session).getType());
+        assertEquals(SessionEvent.Type.NOTIFICATION, SessionEvent.notification(session).getType());
+        assertEquals(SessionEvent.Type.OUT_RPC_ERROR, SessionEvent.outRpcError(session).getType());
+    }
+}