summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-10-19 23:39:36 +0300
committerYuli Shlosberg <ys9693@att.com>2017-10-22 13:30:52 +0000
commit968d54ca133fa53a3617fae6ff30e3ff06f1805e (patch)
tree3292470dc241433e8fce86027d132f34f8223180 /catalog-model
parentc7026576d55cce40fb9928616ab63f5a73663238 (diff)
add more unit tests remove imports
Change-Id: If2274759f929f595e63d71cc70c374268c019947 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg <ys9693@att.com> (cherry picked from commit b947eb599bfab4599ce1b0c0573b1701c646e429)
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java16
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java67
2 files changed, 77 insertions, 6 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java
index 339023f9a4..806c22a8fb 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java
@@ -1,7 +1,14 @@
package org.openecomp.sdc.be.model.jsontitan.operations;
-import fj.data.Either;
-import org.apache.cassandra.cql3.CQL3Type;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
@@ -21,10 +28,7 @@ import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import java.util.*;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import fj.data.Either;
/**
* Created by chaya on 6/12/2017.
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java
new file mode 100644
index 0000000000..0cea40fcec
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java
@@ -0,0 +1,67 @@
+package org.openecomp.sdc.be.model.tosca;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class ToscaTypeTest {
+
+ private ToscaType createTestSubject() {
+ return ToscaType.BOOLEAN;
+ }
+
+
+ @Test
+ public void testFromYamlTypeName() throws Exception {
+ String typeName = "";
+ ToscaType result;
+
+ // test 1
+ typeName = null;
+ result = ToscaType.fromYamlTypeName(typeName);
+ Assert.assertEquals(null, result);
+
+ // test 2
+ typeName = "";
+ result = ToscaType.fromYamlTypeName(typeName);
+ Assert.assertEquals(null, result);
+ }
+
+
+ @Test
+ public void testIsValidValue() throws Exception {
+ ToscaType testSubject;
+ String value = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isValidValue(value);
+ }
+
+
+
+ @Test
+ public void testConvert() throws Exception {
+ ToscaType testSubject;
+ String value = "";
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convert(value);
+ }
+
+
+ @Test
+ public void testToString() throws Exception {
+ ToscaType testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+} \ No newline at end of file