summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-09-20 18:05:41 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-20 18:05:41 +0000
commit06d1a812c151523c885656c1608d0e53a6cadc10 (patch)
tree283541c17d015b7b8a599ad59999cd0dcfae7cdf /ms
parentdfed21031ecf404b94e4e623bdfa1e82af6434c7 (diff)
parente9486787e938a214939554a7e36b19453ba1efdf (diff)
Merge "Added test file to cover GeneratedName"
Diffstat (limited to 'ms')
-rw-r--r--ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedNameTest.java90
1 files changed, 90 insertions, 0 deletions
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedNameTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedNameTest.java
new file mode 100644
index 00000000..7965b7a4
--- /dev/null
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedNameTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * Copyright (C) 2018 IBM.
+ * ================================================================================
+ * 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.ccsdk.apps.ms.neng.persistence.entity;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GeneratedNameTest {
+ private GeneratedName generatedName;
+
+ @Before
+ public void setUp() {
+ generatedName = new GeneratedName();
+ }
+
+ @Test
+ public void testGetSetGeneratedNameId() {
+ generatedName.setGeneratedNameId(1);
+ Integer expected = 1;
+ Assert.assertEquals(expected, generatedName.getGeneratedNameId());
+ }
+
+ @Test
+ public void testGetSetSequenceNumber() {
+ generatedName.setSequenceNumber(2121314312321L);
+ Long expected = 2121314312321L;
+ Assert.assertEquals(expected, generatedName.getSequenceNumber());
+ }
+
+ @Test
+ public void testGetSetSequenceNumberEnc() {
+ generatedName.setSequenceNumberEnc("TestSequenceNumberEnc");
+ String expected = "TestSequenceNumberEnc";
+ Assert.assertEquals(expected, generatedName.getSequenceNumberEnc());
+ }
+
+ @Test
+ public void testGetSetElementType() {
+ generatedName.setElementType("TestElementType");
+ String expected = "TestElementType";
+ Assert.assertEquals(expected, generatedName.getElementType());
+ }
+
+ @Test
+ public void testGetSetName() {
+ generatedName.setName("TestName");
+ String expected = "TestName";
+ Assert.assertEquals(expected, generatedName.getName());
+ }
+
+ @Test
+ public void testGetSetPrefix() {
+ generatedName.setPrefix("TestPrefix");
+ String expected = "TestPrefix";
+ Assert.assertEquals(expected, generatedName.getPrefix());
+ }
+
+ @Test
+ public void testGetSetSuffix() {
+ generatedName.setSuffix("TestSuffix");
+ String expected = "TestSuffix";
+ Assert.assertEquals(expected, generatedName.getSuffix());
+ }
+
+ @Test
+ public void testGetSetIsReleased() {
+ generatedName.setIsReleased("TestIsReleased");
+ String expected = "TestIsReleased";
+ Assert.assertEquals(expected, generatedName.getIsReleased());
+ }
+
+}