2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.appc.sdc.artifacts.object;
22 import static org.junit.Assert.assertNotEquals;
23 import static org.junit.Assert.assertTrue;
25 import org.junit.Assert;
26 import org.junit.Before;
27 import org.junit.Test;
29 public class SDCReferenceTest {
30 private SDCReference sDCReference;
34 sDCReference = new SDCReference();
37 public void testGetVnfType() {
38 sDCReference.setVnfType("vnfType");
39 Assert.assertNotNull(sDCReference.getVnfType());
40 Assert.assertEquals("vnfType", sDCReference.getVnfType());
44 public void testGetVnfcType() {
45 sDCReference.setVnfcType("vnfcType");
46 Assert.assertNotNull(sDCReference.getVnfcType());
47 Assert.assertEquals("vnfcType", sDCReference.getVnfcType());
51 public void testGetFileCategory() {
52 sDCReference.setFileCategory("fileCategory");
53 Assert.assertNotNull(sDCReference.getFileCategory());
54 Assert.assertEquals("fileCategory", sDCReference.getFileCategory());
58 public void testGetAction() {
59 sDCReference.setAction("action");
60 Assert.assertNotNull(sDCReference.getAction());
61 Assert.assertEquals("action", sDCReference.getAction());
65 public void testGetArtifactType() {
66 sDCReference.setArtifactType("artifactType");
67 Assert.assertNotNull(sDCReference.getArtifactType());
68 Assert.assertEquals("artifactType", sDCReference.getArtifactType());
72 public void testGetArtifactName() {
73 sDCReference.setArtifactName("artifactName");
74 Assert.assertNotNull(sDCReference.getArtifactName());
75 Assert.assertEquals("artifactName", sDCReference.getArtifactName());
79 public void testToString_ReturnNonEmptyString() {
80 assertNotEquals(sDCReference.toString(), "");
81 assertNotEquals(sDCReference.toString(), null);
85 public void testToString_ContainsString() {
86 assertTrue(sDCReference.toString().contains("vnfType"));