2 * Copyright © 2016-2019 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openecomp.sdc.be.components.property;
19 import static org.junit.Assert.assertTrue;
21 import org.junit.Before;
22 import org.junit.Test;
23 import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition;
25 public class GetInputUtilsTest {
26 private static final String INPUT_ID = "inputUid";
27 private GetInputValueDataDefinition getInput;
31 getInput = new GetInputValueDataDefinition();
32 getInput.setInputId(INPUT_ID);
36 public void isGetInputValueForInput_equalId() {
37 boolean getInputValueForInput = GetInputUtils.isGetInputValueForInput(getInput, INPUT_ID);
38 assertTrue(getInputValueForInput);
42 public void isGetInputValueForInput_byInputData() {
43 GetInputValueDataDefinition getInputIndex = new GetInputValueDataDefinition();
44 getInputIndex.setInputId(INPUT_ID);
45 getInput.setGetInputIndex(getInputIndex);
46 getInput.setInputId("");
48 boolean getInputValueForInput = GetInputUtils.isGetInputValueForInput(getInput, INPUT_ID);
49 assertTrue(getInputValueForInput);