1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
4 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
6 import java.io.IOException;
8 public class UnifiedCompositionNestedSingleComputeFullTest extends BaseFullTranslationTest {
10 private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/nestedSingleCompute/";
13 public void testNestedWithOneCompute() throws IOException {
14 testTranslationWithInit(BASE_DIRECTORY + "nestedWithOneCompute");
18 public void testNestedWithOneComputeSamePortType() throws IOException {
19 testTranslationWithInit(BASE_DIRECTORY + "nestedWithOneComputeDiffPortType");
23 public void testOneNestedWithTwoComputesOfSameType() throws IOException {
24 //Not pattern 4 (Complex VFC)
25 testTranslationWithInit(BASE_DIRECTORY + "nestedWithTwoComputesOfSameType");
29 public void testOneNestedWithTwoDiffComputeTypes() throws IOException {
30 //Not pattern 4 (Complex VFC)
31 testTranslationWithInit(BASE_DIRECTORY + "nestedWithTwoDiffComputeTypes");
35 public void testTwoNestedNodeTemplatesOfSameType() throws IOException {
36 testTranslationWithInit(BASE_DIRECTORY + "twoNestedNodeTemplatesWithSameComputeType");
40 public void testTwoDiffNestedFilesWithSameComputeType() throws IOException {
41 testTranslationWithInit(BASE_DIRECTORY + "diffNestedFilesWithSameComputeType");
45 public void testNestedCompositionNodesConnectedIn() throws IOException {
47 Nested Composition + node connected In
48 a. Dependency between a nested compute and a non-nested compute resource
49 b. Dependency between a nested compute and another nested resource (same type)
50 c. Dependency between a nested compute and another nested resource (different type)
51 d. Dependency between a non-consolidation entity resource and a nested compute resource
52 e. Dependency between a non-consolidation entity resource and a non-nested compute resource
53 f. Security Rule to Port nested connection
54 g. Security Rule to Port nested shared connection
56 testTranslationWithInit(BASE_DIRECTORY + "nestedNodesConnectedIn");
60 public void testNestedCompositionNodesGetAttrIn() throws IOException {
62 Nested composition with Get attribute in -
63 a. Get attribute in a non-nested compute from a nested compute resource
64 b. Get attribute in a non-nested compute from another consolidation entity resource
65 c. Get attribute in a nested compute from another nested compute resource of same type
66 d. Get attribute in a nested compute from another nested compute resource of different type
67 e. Get attribute in a nested compute from a regular consolidation entity resource
68 f. Get attribute in a non-consolidation entity resource from a nested compute resource
69 g. Get attribute in a non-consolidation entity resource from a non-nested compute resource
71 testTranslationWithInit(BASE_DIRECTORY + "nestedNodesGetAttrIn");
75 public void testNestedCompositionOutputParamGetAttrIn() throws IOException {
77 Nested Composition + Output Param get attribute In
78 a. From a nested resource
79 b. From another nested resource of same type (represented by same nested file)
80 c. From a nested resource of different type (represented by different nested file)
81 d. From a non-nested consolidation entity resource
82 e. From a regular non-consolidation entity resource
84 testTranslationWithInit(BASE_DIRECTORY + "nestedOutputParamGetAttrIn");
88 public void testMultiLevelNestedComposition() throws IOException {
89 //Not pattern 4 (Multi level Complex VFC)
90 testTranslationWithInit(BASE_DIRECTORY + "nestedMultiLevels");
94 public void testThreeNestedSameTypeTwoPointingToSameNestedFile() throws IOException {
95 testTranslationWithInit(BASE_DIRECTORY + "threeNestedSameTypeTwoPointingOnSameNestedFile");
99 public void testThreeNestedSameTypePointingToDiffFiles() throws IOException {
100 testTranslationWithInit(BASE_DIRECTORY + "threeNestedPointingToThreeDiffNestedFilesSameComputeType");
104 public void testMultipleReferencesToSameNestedFilesWithSameComputeType() throws IOException {
105 testTranslationWithInit(BASE_DIRECTORY + "multipleReferencesToSameNestedFilesWithSameComputeType");
109 public void testDuplicateReq() throws IOException {
110 testTranslationWithInit(BASE_DIRECTORY + "duplicateReqs");