2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright 2018 TechMahindra
\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
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.mso.openstack.utils;
\r
23 import static org.mockito.Mockito.mock;
\r
24 import static org.mockito.Mockito.when;
\r
25 import java.util.HashSet;
\r
26 import java.util.Set;
\r
27 import org.junit.Test;
\r
28 import org.mockito.Mock;
\r
29 import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
\r
30 import org.powermock.api.mockito.PowerMockito;
\r
32 public class MsoYamlEditorWithEnvtTest {
\r
35 MsoHeatEnvironmentParameter mhep;
\r
38 HeatTemplateParam hep;
\r
41 public void testgetParameterList() {
\r
42 Set<HeatTemplateParam> paramSet = new HashSet<>();
\r
44 mhep=PowerMockito.spy(new MsoHeatEnvironmentParameter());
\r
45 MsoYamlEditorWithEnvt Mso=mock(MsoYamlEditorWithEnvt.class);
\r
46 when(Mso.getParameterList()).thenReturn(paramSet);
\r
47 assert(Mso.getParameterList()!=null);
\r
51 public void testgetResourceLisstFromEnvt() {
\r
52 Set<MsoHeatEnvironmentParameter> paramSet = new HashSet<>();
\r
54 new MsoHeatEnvironmentResource();;
\r
55 mhep=PowerMockito.spy(new MsoHeatEnvironmentParameter());
\r
56 MsoYamlEditorWithEnvt Mso=mock(MsoYamlEditorWithEnvt.class);
\r
57 when(Mso.getParameterListFromEnvt()).thenReturn(paramSet);
\r
61 public void getParameterListFromEnvt() {
\r
62 mhep=PowerMockito.spy(new MsoHeatEnvironmentParameter());
\r
63 Set<MsoHeatEnvironmentParameter> paramSet = new HashSet<>();
\r
65 new MsoHeatEnvironmentResource();;
\r
66 MsoYamlEditorWithEnvt Mso=mock(MsoYamlEditorWithEnvt.class);
\r
67 when(Mso.getParameterListFromEnvt()).thenReturn(paramSet);
\r