Update runtime-api with refactored bp-gen
[dcaegen2/platform.git] / mod / runtimeapi / runtime-core / src / test / java / org / onap / dcae / runtime / core / TestOnapBpGen.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
4  * Copyright (C) 2020 Nokia. All rights reserved.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  * ============LICENSE_END=========================================================
18  */
19 package org.onap.dcae.runtime.core;
20
21 import org.junit.Test;
22 import org.onap.blueprintgenerator.model.base.Blueprint;
23 import org.onap.blueprintgenerator.model.common.Input;
24 import org.onap.blueprintgenerator.model.componentspec.OnapComponentSpec;
25
26 public class TestOnapBpGen extends BpGenTestBase {
27
28     @Test
29     public void testOnapBPGeneration() throws Exception {
30         OnapComponentSpec componentSpec = componentSpecService.createComponentSpecFromString(
31             Helper.loadFileContent("src/test/data/compspecs/componentSpec_hello_world_only_MR.json"));
32         Input input = new Input();
33         input.setBpType("d");
34         Blueprint blueprint = blueprintCreatorService.createBlueprint(componentSpec, input);
35         System.out.println(blueprint.getInputs());
36     }
37 }