summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest
diff options
context:
space:
mode:
authorPiotr Darosz <piotr.darosz@nokia.com>2019-09-01 15:05:38 +0200
committerTomasz Golabek <tomasz.golabek@nokia.com>2019-09-02 06:41:00 +0000
commitf533d987e5858274c13d35cf28b660a44dcd30c4 (patch)
tree254b4aebe05b03eefaa650eb5d8ea01cc816dd4f /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest
parentab8301883f665ad00910224dff47b6722f4028f5 (diff)
unit tests - openecomp-be
Additional junit tests for dao-types Issue-ID: SDC-2326 Signed-off-by: Piotr Darosz <piotr.darosz@nokia.com> Change-Id: I195610e66628d5d8546846592c98c726ba81824d
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentDependencyModelEntityTest.java65
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentMonitoringUploadEntityTest.java34
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateDataEntityTest.java34
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfoTest.java34
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntityTest.java64
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileDataTest.java34
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetailsTest.java35
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntityTest.java35
8 files changed, 335 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentDependencyModelEntityTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentDependencyModelEntityTest.java
new file mode 100644
index 0000000000..2af1505b78
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentDependencyModelEntityTest.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
+
+public class ComponentDependencyModelEntityTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(ComponentDependencyModelEntity.class,
+ hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId"));
+ }
+
+
+ @Test
+ public void equalsTest() {
+ String vspId = "1";
+ Version version = new Version("2");
+ String dependencyId = "3";
+ ComponentDependencyModelEntity obj = null;
+ ComponentDependencyModelEntity componentDependencyModelEntity =
+ new ComponentDependencyModelEntity(vspId, version, dependencyId);
+ assertNotEquals(componentDependencyModelEntity, obj);
+ obj = new ComponentDependencyModelEntity(vspId, version, dependencyId);
+ assertEquals(componentDependencyModelEntity, obj);
+ }
+
+ @Test
+ public void hashCodeTest() {
+ String vspId = "1";
+ Version version = new Version("2");
+ String dependencyId = "3";
+ ComponentDependencyModelEntity obj = new ComponentDependencyModelEntity(vspId, version, dependencyId);
+ ComponentDependencyModelEntity componentDependencyModelEntity =
+ new ComponentDependencyModelEntity(vspId, version, dependencyId);
+
+ assertEquals(obj.hashCode(), componentDependencyModelEntity.hashCode());
+ assertNotEquals(obj.hashCode(), null);
+ assertNotEquals(componentDependencyModelEntity.hashCode(), 0);
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentMonitoringUploadEntityTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentMonitoringUploadEntityTest.java
new file mode 100644
index 0000000000..525925dd0a
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentMonitoringUploadEntityTest.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
+public class ComponentMonitoringUploadEntityTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(ComponentMonitoringUploadEntity.class,
+ hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId"));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateDataEntityTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateDataEntityTest.java
new file mode 100644
index 0000000000..76dc7d0b19
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/OrchestrationTemplateCandidateDataEntityTest.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
+public class OrchestrationTemplateCandidateDataEntityTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(OrchestrationTemplateCandidateDataEntity.class,
+ hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId"));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfoTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfoTest.java
new file mode 100644
index 0000000000..ea8925b330
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfoTest.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class PackageInfoTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(PackageInfo.class,
+ hasValidGettersAndSetters());
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntityTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntityTest.java
new file mode 100644
index 0000000000..91a92e4e7a
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntityTest.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
+
+public class ProcessEntityTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(ProcessEntity.class,
+ hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId"));
+ }
+
+ @Test
+ public void equalsTest() {
+ String vspId = "1";
+ Version version = new Version("2");
+ String componentId = "3";
+ String id = "4";
+ ProcessEntity obj = null;
+ ProcessEntity processEntity = new ProcessEntity(vspId, version, componentId, id);
+ assertNotEquals(processEntity, obj);
+ obj = new ProcessEntity(vspId, version, componentId, id);
+ assertEquals(processEntity, obj);
+ }
+
+ @Test
+ public void hashCodeTest() {
+ String vspId = "1";
+ Version version = new Version("2");
+ String componentId = "3";
+ String id = "4";
+ ProcessEntity obj = new ProcessEntity(vspId, version, componentId, id);
+ ProcessEntity processEntity = new ProcessEntity(vspId, version, componentId, id);
+
+ assertEquals(obj.hashCode(), processEntity.hashCode());
+ assertNotEquals(obj.hashCode(), null);
+ assertNotEquals(processEntity.hashCode(), 0);
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileDataTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileDataTest.java
new file mode 100644
index 0000000000..1d12a4b066
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileDataTest.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class TranslatedFileDataTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(TranslatedFileData.class,
+ hasValidGettersAndSetters());
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetailsTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetailsTest.java
new file mode 100644
index 0000000000..66f6bf23f4
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetailsTest.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
+public class VspDetailsTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(VspDetails.class,
+ hasValidGettersAndSettersExcluding("compositionData", "compositionEntityId", "entityType",
+ "firstClassCitizenId", "type"));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntityTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntityTest.java
new file mode 100644
index 0000000000..07e3f31366
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntityTest.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
+public class VspQuestionnaireEntityTest {
+ @Test
+ public void accessorsTest() {
+ assertThat(VspQuestionnaireEntity.class,
+ hasValidGettersAndSettersExcluding("compositionData", "compositionEntityId", "entityType",
+ "firstClassCitizenId", "type"));
+ }
+} \ No newline at end of file