From a07d30c2ceedc220a76a75dc003c8512fcc316ed Mon Sep 17 00:00:00 2001 From: Tomasz Golabek Date: Mon, 2 Sep 2019 09:06:00 +0200 Subject: unit tests - openecomp-be Additional junit tests for zusammen models Change-Id: I4593d5c5dfd9619f36c69096462ed5de08b189f0 Issue-ID: SDC-2326 Signed-off-by: Tomasz Golabek --- .../core/tools/model/ColumnDefinitionTest.java | 43 ++++++++++++++++++++++ .../zusammen/datatypes/ElementEntityTest.java | 32 ++++++++++++++++ .../zusammen/datatypes/HealingEntityTest.java | 32 ++++++++++++++++ .../datatypes/VersionElementsEntityTest.java | 32 ++++++++++++++++ .../zusammen/datatypes/VersionEntityTest.java | 32 ++++++++++++++++ 5 files changed, 171 insertions(+) create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/model/ColumnDefinitionTest.java create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/ElementEntityTest.java create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntityTest.java create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionElementsEntityTest.java create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntityTest.java 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 index 0000000000..d756179368 --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/model/ColumnDefinitionTest.java @@ -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 index 0000000000..2ce73f469e --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/ElementEntityTest.java @@ -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 index 0000000000..a62c4021a7 --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntityTest.java @@ -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 index 0000000000..617665d2ef --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionElementsEntityTest.java @@ -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 index 0000000000..742bff6992 --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntityTest.java @@ -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 -- cgit 1.2.3-korg