unit tests - openecomp-be 37/94737/2
authorTomasz Golabek <tomasz.golabek@nokia.com>
Mon, 2 Sep 2019 07:06:00 +0000 (09:06 +0200)
committerTomasz Golabek <tomasz.golabek@nokia.com>
Mon, 2 Sep 2019 07:46:35 +0000 (07:46 +0000)
Additional junit tests for zusammen models

Change-Id: I4593d5c5dfd9619f36c69096462ed5de08b189f0
Issue-ID: SDC-2326
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/model/ColumnDefinitionTest.java [new file with mode: 0644]
openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/ElementEntityTest.java [new file with mode: 0644]
openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntityTest.java [new file with mode: 0644]
openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionElementsEntityTest.java [new file with mode: 0644]
openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntityTest.java [new file with mode: 0644]

diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/model/ColumnDefinitionTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/model/ColumnDefinitionTest.java
new file mode 100644 (file)
index 0000000..d756179
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============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.core.tools.model;
+
+import static org.testng.AssertJUnit.assertEquals;
+
+import com.datastax.driver.core.DataType;
+import org.testng.annotations.Test;
+
+public class ColumnDefinitionTest {
+
+    private static final String KEYSPACE = "keyspace";
+    private static final String TABLE = "table";
+    private static final String NAME = "name";
+    private static final DataType BLOB = DataType.blob();
+
+    @Test
+    public void hasValidGettersAndSettersTest() {
+        ColumnDefinition columnDefinition = new ColumnDefinition(KEYSPACE, TABLE, NAME, BLOB);
+
+        assertEquals(columnDefinition.getKeyspace(), KEYSPACE);
+        assertEquals(columnDefinition.getName(), NAME);
+        assertEquals(columnDefinition.getTable(), TABLE);
+        assertEquals(columnDefinition.getType(), BLOB.getName().toString());
+    }
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/ElementEntityTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/ElementEntityTest.java
new file mode 100644 (file)
index 0000000..2ce73f4
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============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.core.tools.store.zusammen.datatypes;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.testng.annotations.Test;
+
+public class ElementEntityTest {
+    @Test
+    public void hasValidGettersAndSettersTest() {
+        assertThat(ElementEntity.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntityTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntityTest.java
new file mode 100644 (file)
index 0000000..a62c402
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============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.core.tools.store.zusammen.datatypes;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.testng.annotations.Test;
+
+public class HealingEntityTest {
+    @Test
+    public void hasValidGettersAndSettersTest() {
+        assertThat(HealingEntity.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionElementsEntityTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionElementsEntityTest.java
new file mode 100644 (file)
index 0000000..617665d
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============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.core.tools.store.zusammen.datatypes;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.testng.annotations.Test;
+
+public class VersionElementsEntityTest {
+    @Test
+    public void hasValidGettersAndSettersTest() {
+        assertThat(VersionElementsEntity.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntityTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntityTest.java
new file mode 100644 (file)
index 0000000..742bff6
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============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.core.tools.store.zusammen.datatypes;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.testng.annotations.Test;
+
+public class VersionEntityTest {
+    @Test
+    public void hasValidGettersAndSettersTest() {
+        assertThat(VersionEntity.class, hasValidGettersAndSetters());
+    }
+}
\ No newline at end of file