Merge "netconf-api simple unit test added"
authorTomas Cere <tcere@cisco.com>
Thu, 29 Sep 2016 11:51:09 +0000 (11:51 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 29 Sep 2016 11:51:09 +0000 (11:51 +0000)
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());
+    }
+}