2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * ============LICENSE_END=========================================================
22 package org.onap.appc.seqgen.objects;
24 import static org.junit.Assert.assertTrue;
26 import java.util.ArrayList;
27 import java.util.HashSet;
28 import java.util.List;
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;
36 public class SequenceGeneratorInputBuilderTest {
38 private SequenceGeneratorInputBuilder sequenceGeneratorInputBuilder;
43 sequenceGeneratorInputBuilder= new SequenceGeneratorInputBuilder();
47 public void testRequestInfo()
49 RequestInfo requestInfo= new RequestInfo();
50 assertTrue(sequenceGeneratorInputBuilder.requestInfo(requestInfo) instanceof SequenceGeneratorInputBuilder);
55 public void testCapability()
57 String level= "testLevel";
58 List<String> capabilities= new ArrayList<>();
59 assertTrue(sequenceGeneratorInputBuilder.capability(level, capabilities) instanceof SequenceGeneratorInputBuilder);
64 public void testTunableParameter()
66 assertTrue(sequenceGeneratorInputBuilder.tunableParameter("key", "value") instanceof SequenceGeneratorInputBuilder);
71 public void testInventoryModel()
73 InventoryModel model= new InventoryModel(new Vnf());
74 assertTrue(sequenceGeneratorInputBuilder.inventoryModel(model) instanceof SequenceGeneratorInputBuilder);
79 public void testDependencyModel()
81 VnfcDependencyModel model= new VnfcDependencyModel(new HashSet<>());
82 assertTrue(sequenceGeneratorInputBuilder.dependendcyModel(model) instanceof SequenceGeneratorInputBuilder);