aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java85
1 files changed, 85 insertions, 0 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java
new file mode 100644
index 0000000000..69aa1601d5
--- /dev/null
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ESArtifactDataTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.sdc.be.resources.data;
+
+import java.nio.ByteBuffer;
+
+import org.junit.Test;
+
+public class ESArtifactDataTest {
+
+ private ESArtifactData createTestSubject() {
+ return new ESArtifactData();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ new ESArtifactData("mock");
+ new ESArtifactData("mock", new byte[0]);
+ }
+
+ @Test
+ public void testGetDataAsArray() throws Exception {
+ ESArtifactData testSubject;
+ byte[] result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDataAsArray();
+ }
+
+ @Test
+ public void testSetDataAsArray() throws Exception {
+ ESArtifactData testSubject;
+ byte[] data = new byte[] { ' ' };
+
+ // test 1
+ testSubject = createTestSubject();
+ data = null;
+ testSubject.setDataAsArray(data);
+
+ // test 2
+ testSubject = createTestSubject();
+ data = new byte[] { ' ' };
+ testSubject.setDataAsArray(data);
+ }
+
+ @Test
+ public void testGetData() throws Exception {
+ ESArtifactData testSubject;
+ ByteBuffer result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getData();
+ }
+
+ @Test
+ public void testSetData() throws Exception {
+ ESArtifactData testSubject;
+ ByteBuffer data = null;
+
+ // test 1
+ testSubject = createTestSubject();
+ data = null;
+ testSubject.setData(data);
+ }
+
+ @Test
+ public void testGetId() throws Exception {
+ ESArtifactData testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getId();
+ }
+
+ @Test
+ public void testSetId() throws Exception {
+ ESArtifactData testSubject;
+ String id = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setId(id);
+ }
+} \ No newline at end of file