1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Assert;
4 import org.junit.Before;
6 import org.openecomp.sdc.logging.api.Logger;
7 import org.openecomp.sdc.logging.api.LoggerFactory;
8 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
10 import java.io.IOException;
12 public class UnifiedCompositionMixPatternFullTest extends BaseFullTranslationTest {
14 private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
18 public void setUp() throws IOException {
19 // do not delete this function. it prevents the superclass setup from running
23 public void testMixPatterns() throws IOException {
25 "/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/in";
27 "/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/out";
29 testTranslationWithInit();
33 public void testMixPatternsWithConnectivityBetweenPatterns() throws IOException {
35 "/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/in";
37 "/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/out";
39 testTranslationWithInit();
43 public void testMixPatternsWithConnectivityAndMoreThanOneOccurenceForEachPattern()
46 "/mock/services/heattotosca/fulltest/mixPatterns/twoAppearancePerPatternWithConnectivities/in";
48 "/mock/services/heattotosca/fulltest/mixPatterns/twoAppearancePerPatternWithConnectivities/out";
50 testTranslationWithInit();
54 public void testDuplicateResourceIdsInDiffAddOnFiles() throws IOException {
56 "/mock/services/heattotosca/fulltest/mixPatterns/duplicateResourceIdsInDiffAddOnFiles/in";
59 testTranslationWithInit();
62 Assert.assertEquals(e.getMessage(), "Resource with id lb_0_int_oam_int_0_port occures more " +
63 "than once in different addOn files");
68 public void testMixPatternsWithDependencyConnectivity() throws IOException {
70 "/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/in";
72 "/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/out";
74 testTranslationWithInit();