2 * ============LICENSE_START=============================================================================================================
3 * Copyright (c) 2019 <Company or Individual>.
4 * ===================================================================
5 * 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
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * 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
10 * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
11 * ============LICENSE_END===============================================================================================================
14 package org.openecomp.sdc.be.components.property;
16 import static org.junit.Assert.assertTrue;
18 import org.junit.Before;
19 import org.junit.Test;
20 import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition;
22 public class GetInputUtilsTest {
23 private static final String INPUT_ID = "inputUid";
24 private GetInputValueDataDefinition getInput;
28 getInput = new GetInputValueDataDefinition();
29 getInput.setInputId(INPUT_ID);
33 public void isGetInputValueForInput_equalId() {
34 boolean getInputValueForInput = GetInputUtils.isGetInputValueForInput(getInput, INPUT_ID);
35 assertTrue(getInputValueForInput);
39 public void isGetInputValueForInput_byInputData() {
40 GetInputValueDataDefinition getInputIndex = new GetInputValueDataDefinition();
41 getInputIndex.setInputId(INPUT_ID);
42 getInput.setGetInputIndex(getInputIndex);
43 getInput.setInputId("");
45 boolean getInputValueForInput = GetInputUtils.isGetInputValueForInput(getInput, INPUT_ID);
46 assertTrue(getInputValueForInput);