2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ============LICENSE_END=========================================================
18 package org.onap.dcae.runtime.core;
20 import org.onap.dcae.runtime.core.blueprint_creator.BlueprintCreator;
21 import org.junit.Before;
22 import org.junit.Ignore;
23 import org.junit.Test;
24 import org.onap.dcae.runtime.core.blueprint_creator.BlueprintCreatorOnap;
26 public class TestIntegeration {
28 private FlowGraphParser flowGraphParser;
31 public void setUp() throws Exception{
33 FlowGraph<Node, Edge> flowGraph = Helper.prepareFlowGraph();
35 //2. Inject graph in FlowGraphParser
36 BlueprintCreator blueprintCreator = new BlueprintCreatorOnap();
37 flowGraphParser = new FlowGraphParser(blueprintCreator);
38 flowGraphParser.parse(flowGraph);
43 public void testParserCreatesBlueprintsFromFlowGraph() throws Exception{
46 //3. Check if the parser can create blueprints for the componentSpec collection
47 //resultMap has key as a component-name and value is a blueprint string
48 Map<String,String> expectedBlueprints = Helper.loadTestBlueprints();
49 Map<String,String> resultBlueprints = flowGraphParser.createAndProcessBlueprints();
51 assertEquals(expectedBlueprints,resultBlueprints);