common code coverage increase 05/94905/2
authorPiotr Darosz <piotr.darosz@nokia.com>
Wed, 4 Sep 2019 08:05:34 +0000 (10:05 +0200)
committerTomasz Golabek <tomasz.golabek@nokia.com>
Wed, 4 Sep 2019 10:29:46 +0000 (10:29 +0000)
Add tests for classes in sdc.tosca.datatypes.model package

Change-Id: Ifc277512d833b2501f0e594b9062d39c26565055
Issue-ID: SDC-2326
Signed-off-by: Piotr Darosz <piotr.darosz@nokia.com>
47 files changed:
common/onap-tosca-datatype/pom.xml
common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/Implementation.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ActivityDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityAssignmentTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityDefinitionTest.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConditionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CredentialTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/DataTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/EventFilterTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImplementationTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImportTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTemplateTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/NodeTemplateTest.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/NodeTypeTest.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTemplateTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PreconditionDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTemplateTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RepositoryTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RequirementAssignmentTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ScalarTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ServiceTemplateTest.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/StepDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/SubstitutionMappingTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TimeIntervalTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TopologyTemplateTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TriggerTest.java
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/WorkflowDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/RequirementAssignmentExtTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/SubstitutionMappingExtTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationDefinitionTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationTypeTest.java [new file with mode: 0644]
common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExtTest.java [new file with mode: 0644]
openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinitionTest.java

index f63bfa6..10f89d6 100644 (file)
                        <artifactId>slf4j-api</artifactId>
                        <version>${slf4j.version}</version>
                </dependency>
+               <dependency>
+                       <groupId>com.google.code.bean-matchers</groupId>
+                       <artifactId>bean-matchers</artifactId>
+                       <version>${bean-matchers.version}</version>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 </project>
index 80a2a22..e771f4e 100644 (file)
  * 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.
+ * Modifications copyright (c) 2019 Nokia
  */
 
 package org.onap.sdc.tosca.datatypes.model;
 
-import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
+
 import org.onap.sdc.tosca.services.DataModelCloneUtil;
 
 
@@ -52,8 +53,8 @@ public class Implementation implements Cloneable {
             return false;
         }
         Implementation that = (Implementation) o;
-        return Objects.equals(primary, that.primary) && Objects.equals(new HashSet<>(dependencies),
-                new HashSet<>(that.dependencies));
+        return Objects.equals(primary, that.primary)
+                && Objects.equals(dependencies, that.dependencies);
     }
 
     @Override
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ActivityDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ActivityDefinitionTest.java
new file mode 100644 (file)
index 0000000..89fe98e
--- /dev/null
@@ -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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ActivityDefinitionTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ActivityDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactDefinitionTest.java
new file mode 100644 (file)
index 0000000..bf36fe3
--- /dev/null
@@ -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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ArtifactDefinitionTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ArtifactDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ArtifactTypeTest.java
new file mode 100644 (file)
index 0000000..ee94e68
--- /dev/null
@@ -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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ArtifactTypeTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ArtifactType.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java
new file mode 100644 (file)
index 0000000..2378329
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+public class AttributeDefinitionTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(AttributeDefinition.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidCloneMethod() {
+        AttributeDefinition attributeDefinition = new AttributeDefinition();
+        attributeDefinition.setType("type");
+        attributeDefinition.setDescription("description");
+        attributeDefinition.set_default("default");
+        attributeDefinition.setStatus(Status.SUPPORTED);
+        attributeDefinition.setEntry_schema(new EntrySchema());
+
+        AttributeDefinition cloned = attributeDefinition.clone();
+        assertEquals(attributeDefinition.getType(), cloned.getType());
+        assertEquals(attributeDefinition.getDescription(), cloned.getDescription());
+        assertEquals(attributeDefinition.get_default(), cloned.get_default());
+        assertEquals(attributeDefinition.getStatus(), cloned.getStatus());
+
+        assertThat(attributeDefinition.getEntry_schema().getConstraints(),
+                is(cloned.getEntry_schema().getConstraints()));
+        assertThat(attributeDefinition.getEntry_schema().getDescription(),
+                is(cloned.getEntry_schema().getDescription()));
+        assertThat(attributeDefinition.getEntry_schema().getType(),
+                is(cloned.getEntry_schema().getType()));
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityAssignmentTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityAssignmentTest.java
new file mode 100644 (file)
index 0000000..6f430cd
--- /dev/null
@@ -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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class CapabilityAssignmentTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(CapabilityAssignment.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
index 95bc6e5..31091ef 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.onap.sdc.tosca.datatypes.model;
 
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Mockito;
 
 import static org.junit.Assert.assertEquals;
 
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilterTest.java
new file mode 100644 (file)
index 0000000..96d5f37
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class CapabilityFilterTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(CapabilityFilter.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(CapabilityFilter.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CapabilityTypeTest.java
new file mode 100644 (file)
index 0000000..6e8cb11
--- /dev/null
@@ -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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class CapabilityTypeTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(CapabilityType.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConditionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ConditionTest.java
new file mode 100644 (file)
index 0000000..a3656ea
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ConditionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Condition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CredentialTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/CredentialTest.java
new file mode 100644 (file)
index 0000000..9860801
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class CredentialTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Credential.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/DataTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/DataTypeTest.java
new file mode 100644 (file)
index 0000000..23616f0
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class DataTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(DataType.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/EventFilterTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/EventFilterTest.java
new file mode 100644 (file)
index 0000000..6fe557b
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class EventFilterTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(EventFilter.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupDefinitionTest.java
new file mode 100644 (file)
index 0000000..5841b60
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class GroupDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(GroupDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/GroupTypeTest.java
new file mode 100644 (file)
index 0000000..d45343f
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class GroupTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(GroupType.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImplementationTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImplementationTest.java
new file mode 100644 (file)
index 0000000..93ec20d
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ImplementationTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Implementation.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(Implementation.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(Implementation.class, hasValidBeanHashCode());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImportTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ImportTest.java
new file mode 100644 (file)
index 0000000..68f86e2
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ImportTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Import.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTemplateTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTemplateTest.java
new file mode 100644 (file)
index 0000000..9670237
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class InterfaceDefinitionTemplateTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(InterfaceDefinitionTemplate.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(InterfaceDefinitionTemplate.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(InterfaceDefinitionTemplate.class, hasValidBeanHashCode());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionTypeTest.java
new file mode 100644 (file)
index 0000000..42fe0e9
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class InterfaceDefinitionTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(InterfaceDefinitionType.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(InterfaceDefinitionType.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(InterfaceDefinitionType.class, hasValidBeanHashCode());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/InterfaceTypeTest.java
new file mode 100644 (file)
index 0000000..f63d128
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class InterfaceTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(InterfaceType.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(InterfaceType.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(InterfaceType.class, hasValidBeanHashCode());
+    }
+}
\ No newline at end of file
index 1fb886f..b9f2b83 100644 (file)
@@ -12,6 +12,8 @@
  * 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.
+ *
+ * Modifications copyright (c) 2019 Nokia
  */
 
 package org.onap.sdc.tosca.datatypes.model;
@@ -25,6 +27,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCodeExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
 
 public class NodeTemplateTest {
 
@@ -66,6 +73,20 @@ public class NodeTemplateTest {
         Assert.assertEquals(expectedServiceTemplate, actualServiceTemplate);
     }
 
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(NodeTemplate.class, hasValidGettersAndSettersExcluding("normalizeInterfaces"));
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(NodeTemplate.class, hasValidBeanEqualsExcluding("normalizeInterfaces"));
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(NodeTemplate.class, hasValidBeanHashCodeExcluding("normalizeInterfaces"));
+    }
 
     private InterfaceDefinitionTemplate createInterfaceDefinitionTemplate() {
         InterfaceDefinitionTemplate interfaceDefinitionTemplate = new InterfaceDefinitionTemplate();
index 1f0732d..53a5f5c 100644 (file)
@@ -12,6 +12,8 @@
  * 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.
+ *
+ * Modifications copyright (c) 2019 Nokia
  */
 
 package org.onap.sdc.tosca.datatypes.model;
@@ -23,6 +25,9 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.junit.Assert.assertThat;
+
 
 public class NodeTypeTest {
 
@@ -44,6 +49,11 @@ public class NodeTypeTest {
 
     }
 
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(NodeType.class, hasValidGettersAndSettersExcluding("normalizeInterfaces"));
+    }
+
     protected InterfaceDefinitionType chkData(Map<String, InterfaceDefinitionType> normalizeInterfacesNoEvent) {
         Assert.assertNotNull(normalizeInterfacesNoEvent);
         InterfaceDefinitionType interfaceDefinitionType = normalizeInterfacesNoEvent.get(STANDARD_INTERFACE_DEF);
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTemplateTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTemplateTest.java
new file mode 100644 (file)
index 0000000..676a538
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCodeExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class OperationDefinitionTemplateTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(OperationDefinitionTemplate.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(OperationDefinitionTemplate.class, hasValidBeanEqualsExcluding("description"));
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(OperationDefinitionTemplate.class, hasValidBeanHashCodeExcluding("description"));
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTest.java
new file mode 100644 (file)
index 0000000..ef7a1ea
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class OperationDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(OperationDefinition.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(OperationDefinition.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(OperationDefinition.class, hasValidBeanHashCode());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/OperationDefinitionTypeTest.java
new file mode 100644 (file)
index 0000000..8798244
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCodeExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class OperationDefinitionTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(OperationDefinitionType.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(OperationDefinitionType.class, hasValidBeanEqualsExcluding("description"));
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(OperationDefinitionType.class, hasValidBeanHashCodeExcluding("description"));
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyDefinitionTest.java
new file mode 100644 (file)
index 0000000..a6a35bc
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class PolicyDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(PolicyDefinition.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(PolicyDefinition.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(PolicyDefinition.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(PolicyDefinition.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PolicyTypeTest.java
new file mode 100644 (file)
index 0000000..7079539
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class PolicyTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(PolicyType.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(PolicyType.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(PolicyType.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(PolicyType.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PreconditionDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PreconditionDefinitionTest.java
new file mode 100644 (file)
index 0000000..143f205
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class PreconditionDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(PreconditionDefinition.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(PreconditionDefinition.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(PreconditionDefinition.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(PreconditionDefinition.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTemplateTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTemplateTest.java
new file mode 100644 (file)
index 0000000..5350ef0
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class RelationshipTemplateTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(RelationshipTemplate.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(RelationshipTemplate.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(RelationshipTemplate.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(RelationshipTemplate.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RelationshipTypeTest.java
new file mode 100644 (file)
index 0000000..1b8167b
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class RelationshipTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(RelationshipType.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(RelationshipType.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(RelationshipType.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(RelationshipType.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RepositoryTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RepositoryTest.java
new file mode 100644 (file)
index 0000000..3c7da27
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class RepositoryTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Repository.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(Repository.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(Repository.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(Repository.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RequirementAssignmentTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/RequirementAssignmentTest.java
new file mode 100644 (file)
index 0000000..1629d97
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanToString;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class RequirementAssignmentTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(RequirementAssignment.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(RequirementAssignment.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(RequirementAssignment.class, hasValidBeanHashCode());
+    }
+
+    @Test
+    public void shouldHaveValidToStringMethod() {
+        assertThat(RequirementAssignment.class, hasValidBeanToString());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ScalarTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/ScalarTest.java
new file mode 100644 (file)
index 0000000..6b073a0
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ScalarTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Scalar.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
index 37be2e4..70f9364 100644 (file)
@@ -12,6 +12,8 @@
  * 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.
+ *
+ * Modifications copyright (c) 2019 Nokia
  */
 
 package org.onap.sdc.tosca.datatypes.model;
@@ -25,6 +27,9 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 public class ServiceTemplateTest {
 
     private static final String INTERFACE_NO_OPER = "amdocs.interfaces.interfaceNoOper";
@@ -61,4 +66,10 @@ public class ServiceTemplateTest {
         }
 
     }
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ServiceTemplate.class,
+                hasValidGettersAndSettersExcluding("imports", "normalizeInterfaceTypes"));
+    }
 }
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/StepDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/StepDefinitionTest.java
new file mode 100644 (file)
index 0000000..fa94696
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class StepDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(StepDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/SubstitutionMappingTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/SubstitutionMappingTest.java
new file mode 100644 (file)
index 0000000..888a51c
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class SubstitutionMappingTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(SubstitutionMapping.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TimeIntervalTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TimeIntervalTest.java
new file mode 100644 (file)
index 0000000..d2df4a5
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class TimeIntervalTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(TimeInterval.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TopologyTemplateTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/TopologyTemplateTest.java
new file mode 100644 (file)
index 0000000..e033c65
--- /dev/null
@@ -0,0 +1,54 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+public class TopologyTemplateTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(TopologyTemplate.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void groupShouldBeNullWhenNotInitialized() {
+        TopologyTemplate topologyTemplate = new TopologyTemplate();
+        assertNull(topologyTemplate.getGroups());
+    }
+
+    @Test
+    public void addGroupShouldCorrectlyInitializeAndAddGroup() {
+        String key = "group1";
+        GroupDefinition groupDefinition = new GroupDefinition();
+        TopologyTemplate topologyTemplate = new TopologyTemplate();
+        topologyTemplate.addGroup(key, groupDefinition);
+
+        assertTrue(topologyTemplate.getGroups().containsKey(key));
+        assertEquals(groupDefinition, topologyTemplate.getGroups().get(key));
+
+    }
+}
\ No newline at end of file
index c9f8d2d..875f2eb 100644 (file)
@@ -12,6 +12,8 @@
  * 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.
+ *
+ * Modifications copyright (c) 2019 Nokia
  */
 
 package org.onap.sdc.tosca.datatypes.model;
@@ -23,6 +25,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 
 public class TriggerTest {
 
@@ -89,5 +96,19 @@ public class TriggerTest {
         Assert.assertNotNull( ((Map)operationAction).get(IMPLEMENTATION));
 
     }
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Trigger.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(Trigger.class, hasValidBeanEquals());
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(Trigger.class, hasValidBeanHashCode());
+    }
 
 }
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/WorkflowDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/WorkflowDefinitionTest.java
new file mode 100644 (file)
index 0000000..ac4315e
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class WorkflowDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(WorkflowDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/RequirementAssignmentExtTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/RequirementAssignmentExtTest.java
new file mode 100644 (file)
index 0000000..2db1636
--- /dev/null
@@ -0,0 +1,47 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model.extension;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCodeExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class RequirementAssignmentExtTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(RequirementAssignmentExt.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(RequirementAssignmentExt.class,
+                hasValidBeanEqualsExcluding("capability", "node", "node_filter", "occurrences", "relationship"));
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(RequirementAssignmentExt.class,
+                hasValidBeanHashCodeExcluding("capability", "node", "node_filter", "occurrences", "relationship"));
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/SubstitutionMappingExtTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/extension/SubstitutionMappingExtTest.java
new file mode 100644 (file)
index 0000000..aa1290b
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model.extension;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCodeExcluding;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class SubstitutionMappingExtTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(SubstitutionMappingExt.class, hasValidGettersAndSetters());
+    }
+
+    @Test
+    public void shouldHaveValidEquals() {
+        assertThat(SubstitutionMappingExt.class, hasValidBeanEqualsExcluding("capabilities", "node_type", "requirements"));
+    }
+
+    @Test
+    public void shouldHaveValidHashCode() {
+        assertThat(SubstitutionMappingExt.class, hasValidBeanHashCodeExcluding("capabilities", "node_type", "requirements"));
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationDefinitionTest.java
new file mode 100644 (file)
index 0000000..0581cdb
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model.heatextend;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class AnnotationDefinitionTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(AnnotationDefinition.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationTypeTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/AnnotationTypeTest.java
new file mode 100644 (file)
index 0000000..6055700
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model.heatextend;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class AnnotationTypeTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(AnnotationType.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExtTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExtTest.java
new file mode 100644 (file)
index 0000000..7001c9b
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.onap.sdc.tosca.datatypes.model.heatextend;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class ParameterDefinitionExtTest {
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ParameterDefinitionExt.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
index a5c8fde..9f6bd25 100644 (file)
@@ -16,6 +16,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.tosca.datatypes.model;
@@ -31,11 +33,18 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 /**
  * @author shiria
  * @since September 07, 2016.
  */
 public class RequirementDefinitionTest {
+  @Test
+  public void shouldHaveValidGettersAndSetters() {
+    assertThat(RequirementDefinition.class, hasValidGettersAndSetters());
+  }
 
   @Test
   public void cloneTest() {