aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionCatalogInstanceFullTest.java
blob: b6d0fb8ce964b998a30428c32ffd9f6cfeb3c35a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;

import org.junit.Before;
import org.junit.Test;
import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;

import java.io.IOException;

public class UnifiedCompositionCatalogInstanceFullTest extends BaseFullTranslationTest {

  @Override
  @Before
  public void setUp() throws IOException {
    // do not delete this function. it prevents the superclass setup from running
  }

  @Test
  public void testThreeNovaSameTypeDiffGetAttrFromSameEntitiesTypes() throws IOException {
    inputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypeGetAttrBetweenThem/in";
    outputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypeGetAttrBetweenThem/out";

    testTranslationWithUnifiedCondition();
  }

  @Test
  public void testThreeNovaSameTypePortsConnectedToDiffNetworks() throws IOException {
    inputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypePortsConnectedToDiffNetworks/in";
    outputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypePortsConnectedToDiffNetworks/out";

    testTranslationWithUnifiedCondition();
  }

  @Test
  public void testThreeNovaSameTypeDiffImageName() throws IOException {
    inputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypeDiffImageName/in";
    outputFilesPath =
        "/mock/services/heattotosca/fulltest/catalogInstances/threeComputesSameTypeDiffImageName/out";

    testTranslationWithUnifiedCondition();
  }



  private void testTranslationWithUnifiedCondition() throws IOException {
      initTranslatorAndTranslate();
      testTranslation();
  }
}