diff options
author | Yuli Shlosberg <ys9693@att.com> | 2017-10-19 23:39:36 +0300 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2017-10-19 23:41:33 +0300 |
commit | b947eb599bfab4599ce1b0c0573b1701c646e429 (patch) | |
tree | 1c9750edbeb5e8a4e924bc100aa418d563942c13 /catalog-model/src | |
parent | 6b2ed6ed1ff9da57cdc48afeec1ca63300b983a7 (diff) |
add more unit tests remove imports
Change-Id: If2274759f929f595e63d71cc70c374268c019947
Issue-Id: SDC-467
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'catalog-model/src')
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 |