f305af873a33db9a2688678bf6769ef88262e093
[appc.git] / appc-sequence-generator / appc-sequence-generator-bundle / src / test / java / org / onap / appc / seqgen / objects / SequenceGeneratorInputBuilderTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2019 IBM. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.appc.seqgen.objects;
23
24 import static org.junit.Assert.assertTrue;
25
26 import java.util.ArrayList;
27 import java.util.HashSet; 
28 import java.util.List;
29
30 import org.junit.Before;
31 import org.junit.Test;
32 import org.onap.appc.dg.objects.InventoryModel;
33 import org.onap.appc.dg.objects.VnfcDependencyModel;
34 import org.onap.appc.domainmodel.Vnf;
35
36 public class SequenceGeneratorInputBuilderTest {
37     
38     private SequenceGeneratorInputBuilder sequenceGeneratorInputBuilder;
39     
40     @Before
41     public void setUp()
42     {
43         sequenceGeneratorInputBuilder= new SequenceGeneratorInputBuilder();
44     }
45     
46     @Test
47     public void testRequestInfo()
48     {
49         RequestInfo requestInfo=  new RequestInfo();
50         assertTrue(sequenceGeneratorInputBuilder.requestInfo(requestInfo) instanceof SequenceGeneratorInputBuilder);
51         
52     }
53     
54     @Test
55     public void testCapability()
56     {
57         String level= "testLevel";
58         List<String> capabilities= new ArrayList<>();
59         assertTrue(sequenceGeneratorInputBuilder.capability(level, capabilities) instanceof SequenceGeneratorInputBuilder);
60         
61     }
62     
63     @Test
64     public void testTunableParameter()
65     {
66         assertTrue(sequenceGeneratorInputBuilder.tunableParameter("key", "value") instanceof SequenceGeneratorInputBuilder);
67         
68     }
69     
70     @Test
71     public void testInventoryModel()
72     {
73         InventoryModel model= new InventoryModel(new Vnf());
74         assertTrue(sequenceGeneratorInputBuilder.inventoryModel(model) instanceof SequenceGeneratorInputBuilder);
75         
76     }
77     
78     @Test
79     public void testDependencyModel()
80     {
81         VnfcDependencyModel model= new VnfcDependencyModel(new HashSet<>());
82         assertTrue(sequenceGeneratorInputBuilder.dependendcyModel(model) instanceof SequenceGeneratorInputBuilder);
83         
84     }
85
86 }