From d5ec7bf55217508e2b5cebe640d586598379f97a Mon Sep 17 00:00:00 2001 From: "Sonsino, Ofir (os0695)" Date: Tue, 13 Mar 2018 18:31:21 +0200 Subject: Unit tests Change-Id: Ib9f73b7ba5a509610896b8bbdc02c180e60ee959 Issue-ID: VID-197 Signed-off-by: Sonsino, Ofir (os0695) --- .../onap/vid/asdc/beans/SecureServicesTest.java | 52 +++++++++ .../org/onap/vid/asdc/beans/tosca/ImportTest.java | 30 +++++ .../onap/vid/asdc/beans/tosca/PropertyTest.java | 130 +++++++++++++++++++++ .../onap/vid/asdc/beans/tosca/RequirementTest.java | 92 +++++++++++++++ .../org/onap/vid/asdc/beans/tosca/SchemaTest.java | 30 +++++ 5 files changed, 334 insertions(+) create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/SecureServicesTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ImportTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/PropertyTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/RequirementTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/SchemaTest.java (limited to 'vid-app-common/src/test/java/org/onap/vid/asdc') diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/beans/SecureServicesTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/SecureServicesTest.java new file mode 100644 index 000000000..3cd84af5f --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/SecureServicesTest.java @@ -0,0 +1,52 @@ +package org.onap.vid.asdc.beans; + +import java.util.Collection; + +import org.junit.Test; + +public class SecureServicesTest { + + private SecureServices createTestSubject() { + return new SecureServices(); + } + + @Test + public void testSetServices() throws Exception { + SecureServices testSubject; + Collection services = null; + + // default test + testSubject = createTestSubject(); + testSubject.setServices(services); + } + + @Test + public void testGetServices() throws Exception { + SecureServices testSubject; + Collection result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServices(); + } + + @Test + public void testIsReadOnly() throws Exception { + SecureServices testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.isReadOnly(); + } + + @Test + public void testSetReadOnly() throws Exception { + SecureServices testSubject; + boolean readOnly = false; + + // default test + testSubject = createTestSubject(); + testSubject.setReadOnly(readOnly); + } +} \ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ImportTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ImportTest.java new file mode 100644 index 000000000..7b72fcc94 --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ImportTest.java @@ -0,0 +1,30 @@ +package org.onap.vid.asdc.beans.tosca; + +import org.junit.Test; + +public class ImportTest { + + private Import createTestSubject() { + return new Import(); + } + + @Test + public void testGetFile() throws Exception { + Import testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getFile(); + } + + @Test + public void testSetFile() throws Exception { + Import testSubject; + String file = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setFile(file); + } +} \ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/PropertyTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/PropertyTest.java new file mode 100644 index 000000000..e638b518d --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/PropertyTest.java @@ -0,0 +1,130 @@ +package org.onap.vid.asdc.beans.tosca; + +import org.junit.Test; + +public class PropertyTest { + + private Property createTestSubject() { + return new Property(); + } + + @Test + public void testGetType() throws Exception { + Property testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testGetDescription() throws Exception { + Property testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + @Test + public void testGetEntry_schema() throws Exception { + Property testSubject; + Schema result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getEntry_schema(); + } + + @Test + public void testGet_default() throws Exception { + Property testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.get_default(); + } + + @Test + public void testSetType() throws Exception { + Property testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + @Test + public void testSetDescription() throws Exception { + Property testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + @Test + public void testSetEntry_schema() throws Exception { + Property testSubject; + Schema entry_schema = null; + + // default test + testSubject = createTestSubject(); + testSubject.setEntry_schema(entry_schema); + } + + @Test + public void testSet_default() throws Exception { + Property testSubject; + String _default = ""; + + // default test + testSubject = createTestSubject(); + testSubject.set_default(_default); + } + + @Test + public void testGetDefault() throws Exception { + Property testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDefault(); + } + + @Test + public void testIsRequired() throws Exception { + Property testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.isRequired(); + } + + @Test + public void testSetDefault() throws Exception { + Property testSubject; + String _default = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDefault(_default); + } + + @Test + public void testSetRequired() throws Exception { + Property testSubject; + boolean required = false; + + // default test + testSubject = createTestSubject(); + testSubject.setRequired(required); + } +} \ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/RequirementTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/RequirementTest.java new file mode 100644 index 000000000..ae5ff5293 --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/RequirementTest.java @@ -0,0 +1,92 @@ +package org.onap.vid.asdc.beans.tosca; + +import java.util.Collection; + +import org.junit.Test; + +public class RequirementTest { + + private Requirement createTestSubject() { + return new Requirement(); + } + + @Test + public void testGetOccurrences() throws Exception { + Requirement testSubject; + Collection result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getOccurrences(); + } + + @Test + public void testGetCapability() throws Exception { + Requirement testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCapability(); + } + + @Test + public void testGetNode() throws Exception { + Requirement testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getNode(); + } + + @Test + public void testGetRelationship() throws Exception { + Requirement testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelationship(); + } + + @Test + public void testSetOccurrences() throws Exception { + Requirement testSubject; + Collection occurrences = null; + + // default test + testSubject = createTestSubject(); + testSubject.setOccurrences(occurrences); + } + + @Test + public void testSetCapability() throws Exception { + Requirement testSubject; + String capability = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCapability(capability); + } + + @Test + public void testSetNode() throws Exception { + Requirement testSubject; + String node = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setNode(node); + } + + @Test + public void testSetRelationship() throws Exception { + Requirement testSubject; + String relationship = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setRelationship(relationship); + } +} \ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/SchemaTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/SchemaTest.java new file mode 100644 index 000000000..198e12809 --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/SchemaTest.java @@ -0,0 +1,30 @@ +package org.onap.vid.asdc.beans.tosca; + +import org.junit.Test; + +public class SchemaTest { + + private Schema createTestSubject() { + return new Schema(); + } + + @Test + public void testGetType() throws Exception { + Schema testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testSetType() throws Exception { + Schema testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } +} \ No newline at end of file -- cgit 1.2.3-korg