summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java
diff options
context:
space:
mode:
authorTait,Trevor(rt0435) <rtait@amdocs.com>2018-11-04 16:30:21 -0500
committerTait,Trevor(rt0435) <rtait@amdocs.com>2018-11-04 16:30:44 -0500
commit3f5ba3e09c2056a83e7376c24b7c44ac3e6d32dd (patch)
tree3d2ca1183a550085f10b817d6d98834166972b45 /src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java
parent23b36e3c69f25d8322afb79d5e6bace519db7cd3 (diff)
Attributes for GENERIC-RESOURCE-API and VNF-API
Extract Attributes for GENERIC-RESOURCE-API and VNF-API Issue-ID: LOG-797 Change-Id: I6ae2727bd85069fc89d65c0083167ca69b343895 Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java')
-rw-r--r--src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java b/src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java
new file mode 100644
index 0000000..daa3dd7
--- /dev/null
+++ b/src/test/java/org/onap/pomba/contextbuilder/sdnc/test/ImageTest.java
@@ -0,0 +1,49 @@
+package org.onap.pomba.contextbuilder.sdnc.test;
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * 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=====================================================
+ */
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.pomba.contextbuilder.sdnc.model.Image;
+
+public class ImageTest {
+ @Test
+ public void testImageWithParameters() {
+ Image image = new Image("imageName");
+ assertEquals("imageName", image.getImageName());
+ }
+
+ @Test
+ public void testImage() {
+ Image image = new Image();
+ image.setImageName("imageName");
+ assertEquals("imageName", image.getImageName());
+ String imageString = image.toString();
+ assertTrue(imageString.contains("imageName"));
+ }
+
+ @Test
+ public void testImageIsEqual() {
+ Image image1 = new Image("imageName");
+ assertTrue(image1.equals(image1));
+ assertTrue(image1.hashCode() == -878349659);
+ }
+
+}