Bug 1520 - Increased test coverage
[controller.git] / opendaylight / config / config-util / src / test / java / org / opendaylight / controller / config / util / AttributeEntryTest.java
diff --git a/opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/AttributeEntryTest.java b/opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/AttributeEntryTest.java
new file mode 100644 (file)
index 0000000..b2afd35
--- /dev/null
@@ -0,0 +1,32 @@
+package org.opendaylight.controller.config.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AttributeEntryTest {
+
+    private AttributeEntry attributeEntryClient;
+    private final String key = "myKey";
+    private final String description = "myDescription";
+    private final String type = "myType";
+    private final boolean boolValue = false;
+
+    @Before
+    public void setUp() throws Exception {
+        attributeEntryClient = new AttributeEntry("myKey", "myDescription", null, "myType", false);
+    }
+
+    @Test
+    public void testAttributeEntryGetters() throws Exception{
+        assertEquals(key, attributeEntryClient.getKey());
+        assertEquals(description, attributeEntryClient.getDescription());
+        final Object value = attributeEntryClient.getValue();
+        assertNull(value);
+        assertEquals(type, attributeEntryClient.getType());
+        assertEquals(boolValue, attributeEntryClient.isRw());
+    }
+}