diff options
author | Yuli Shlosberg <ys9693@att.com> | 2017-10-20 22:51:31 +0300 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2017-10-23 06:53:29 +0000 |
commit | 568db59e15471bf56289ff07dfaca6e2a9081dc4 (patch) | |
tree | 0aa6e45e5c7ece37535fc4a6cf322cfdb938b415 /catalog-be/src/test/java/org/openecomp/sdc/be/tosca | |
parent | 3803dbb31b9dfae1940871f10bb71fc88e593242 (diff) |
add unit tests to components
Change-Id: I665ad7f9f25c15cfaaa8deb38dd2390fd823a438
Issue-Id: SDC-467
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
(cherry picked from commit a78ce5b07f10c6160152a017675b71cca36fb049)
Diffstat (limited to 'catalog-be/src/test/java/org/openecomp/sdc/be/tosca')
3 files changed, 163 insertions, 0 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java new file mode 100644 index 0000000000..e6f1ac82fb --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java @@ -0,0 +1,71 @@ +package org.openecomp.sdc.be.tosca; + +import java.util.Map; + +import javax.annotation.Generated; + +import org.junit.Test; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.DataTypeDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.tosca.model.ToscaNodeType; +import org.openecomp.sdc.be.tosca.model.ToscaProperty; + +import fj.data.Either; + +public class PropertyConvertorTest { + + private PropertyConvertor createTestSubject() { + return new PropertyConvertor(); + } + + + @Test + public void testGetInstance() throws Exception { + PropertyConvertor result; + + // default test + result = PropertyConvertor.getInstance(); + } + + + @Test + public void testConvertProperties() throws Exception { + PropertyConvertor testSubject; + Component component = null; + ToscaNodeType toscaNodeType = null; + Map<String, DataTypeDefinition> dataTypes = null; + Either<ToscaNodeType, ToscaError> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.convertProperties(component, toscaNodeType, dataTypes); + } + + + @Test + public void testConvertProperty() throws Exception { + PropertyConvertor testSubject; + Map<String, DataTypeDefinition> dataTypes = null; + PropertyDefinition property = null; + boolean isCapabiltyProperty = false; + ToscaProperty result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testConvertToToscaObject() throws Exception { + PropertyConvertor testSubject; + String propertyType = ""; + String value = ""; + String innerType = ""; + Map<String, DataTypeDefinition> dataTypes = null; + Object result; + + // default test + testSubject = createTestSubject(); + } +}
\ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java new file mode 100644 index 0000000000..7cb2ef7cf8 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java @@ -0,0 +1,36 @@ +package org.openecomp.sdc.be.tosca; + +import javax.annotation.Generated; + +import org.junit.Test; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.tosca.model.ToscaTemplate; + +import fj.data.Either; + +public class ToscaExportHandlerTest { + + private ToscaExportHandler createTestSubject() { + return new ToscaExportHandler(); + } + + + @Test + public void testGetDependencies() throws Exception { + ToscaExportHandler testSubject; + Component component = null; + Either<ToscaTemplate, ToscaError> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetInterfaceFilename() throws Exception { + String artifactName = ""; + String result; + + // default test + } +}
\ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java new file mode 100644 index 0000000000..c3a993596c --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java @@ -0,0 +1,56 @@ +package org.openecomp.sdc.be.tosca; + +import java.util.List; +import java.util.Map; + +import javax.annotation.Generated; + +import org.junit.Test; +import org.openecomp.sdc.be.model.Component; + +import com.datastax.driver.core.UserType.Field; + +public class ToscaUtilsTest { + + private ToscaUtils createTestSubject() { + return new ToscaUtils(); + } + + + @Test + public void testIsAtomicType() throws Exception { + Component component = null; + boolean result; + + // default test + } + + + @Test + public void testIsComplexVfc() throws Exception { + Component component = null; + boolean result; + + // default test + } + + + @Test + public void testObjectToMap() throws Exception { + Object objectToConvert = null; + Class clazz = null; + Map<String, Object> result; + + // default test + } + + + @Test + public void testGetAllFields() throws Exception { + List<Field> fields = null; + Class<?> type = null; + List<Field> result; + + // default test + } +}
\ No newline at end of file |