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
21 package org.onap.appc.flow.controller.data;
\r
23 import static org.junit.Assert.assertEquals;
\r
24 import static org.junit.Assert.assertNotNull;
\r
26 import java.util.LinkedList;
\r
27 import java.util.List;
\r
29 import org.junit.Before;
\r
30 import org.junit.Test;
\r
32 public class PreCheckTest {
\r
34 private PreCheck preCheck;
\r
37 public void SetUp() {
\r
38 preCheck = new PreCheck();
\r
42 public void testSetPrecheckOperator() {
\r
43 preCheck.setPrecheckOperator("op");
\r
44 assertNotNull(preCheck.getPrecheckOperator());
\r
45 assertEquals(preCheck.getPrecheckOperator(),"op");
\r
49 public void testSetPrecheckOptions() {
\r
50 List<PrecheckOption> precheckOptionList = new LinkedList<>();
\r
51 preCheck.setPrecheckOptions(precheckOptionList);
\r
52 assertNotNull(preCheck.getPrecheckOptions());
\r
53 assertEquals(preCheck.getPrecheckOptions(), precheckOptionList);
\r
57 public void testHashCode() {
\r
58 preCheck.setPrecheckOperator("1");
\r
59 System.out.println(" precheck hashcode is " + preCheck.hashCode());
\r
63 public void testToString() {
\r
64 preCheck.setPrecheckOperator("A");
\r
65 List<PrecheckOption> precheckOptionList = new LinkedList<>();
\r
66 preCheck.setPrecheckOptions(precheckOptionList);
\r
67 String ret = preCheck.toString();
\r
68 System.out.println("ret is " + ret);
\r