aboutsummaryrefslogtreecommitdiffstats
path: root/appc-sdc-listener
diff options
context:
space:
mode:
Diffstat (limited to 'appc-sdc-listener')
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/java/org/onap/appc/yang/type/TestYangTypes.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/appc-sdc-listener/appc-yang-generator/src/test/java/org/onap/appc/yang/type/TestYangTypes.java b/appc-sdc-listener/appc-yang-generator/src/test/java/org/onap/appc/yang/type/TestYangTypes.java
new file mode 100644
index 000000000..778574f1c
--- /dev/null
+++ b/appc-sdc-listener/appc-yang-generator/src/test/java/org/onap/appc/yang/type/TestYangTypes.java
@@ -0,0 +1,28 @@
+package org.onap.appc.yang.type;
+
+import static org.junit.Assert.assertEquals;
+import java.util.Map;
+import org.junit.Test;
+
+public class TestYangTypes {
+ private Map<String, String> testTypeMap = YangTypes.getYangTypeMap();
+
+ @Test
+ public void testGetYangTypeMap_Size() {
+ assertEquals(48, testTypeMap.size());
+ }
+ @Test(expected = java.lang.UnsupportedOperationException.class)
+ public void testGetYangTypeMap_UnModifiableMap() {
+ testTypeMap.remove("timeticks");
+ assertEquals(47, testTypeMap.size());
+ }
+ @Test
+ public void testGetYangTypeMap_ValidKey() {
+ assertEquals("uint64", testTypeMap.get("uint64"));
+ }
+ @Test
+ public void testGetYangTypeMap_In_ValidKey() {
+ assertEquals(null, testTypeMap.get("uint128"));
+ }
+
+}