2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
\r
6 * =============================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
19 * ============LICENSE_END=========================================================
\r
22 package org.onap.appc.flow.controller.data;
\r
24 import static org.junit.Assert.assertTrue;
\r
25 import static org.junit.Assert.assertFalse;
\r
26 import static org.junit.Assert.assertEquals;
\r
27 import static org.junit.Assert.assertNotNull;
\r
29 import org.junit.Before;
\r
30 import org.junit.Test;
\r
32 public class ParametersTest {
\r
33 private Parameters param;
\r
34 private Parameters param1;
\r
35 private Parameters param2;
\r
38 public void SetUp() {
\r
39 param = new Parameters();
\r
40 param1 = new Parameters();
\r
41 param2 = new Parameters();
\r
45 public void testSetParamValue() {
\r
46 param.setParamValue("1");
\r
47 assertNotNull(param.getParamValue());
\r
48 assertEquals(param.getParamValue(),"1");
\r
52 public void testSetParamName() {
\r
53 param.setParamName("abc");
\r
54 assertNotNull(param.getParamName());
\r
55 assertEquals(param.getParamName(),"abc");
\r
59 public void testHashCode_Print() {
\r
60 param.setParamName("2");
\r
61 param.setParamValue("def");
\r
62 System.out.println("param hashcode is " + param.hashCode());
\r
66 public void testToString() {
\r
67 param.setParamName("3");
\r
68 param.setParamValue("ghi");
\r
69 String ret = param.toString();
\r
70 assertFalse("toString is not empty", ret.isEmpty());
\r
74 public void testEqualsObject() {
\r
75 assertTrue(param1.equals(param2) && param2.equals(param1));
\r
76 assertTrue(param1.equals(param1));
\r
77 assertFalse(param1.equals(null));
\r