1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Assert;
4 import org.junit.Before;
7 import org.junit.rules.ExpectedException;
8 import org.openecomp.sdc.common.errors.CoreException;
9 import org.openecomp.sdc.logging.api.Logger;
10 import org.openecomp.sdc.logging.api.LoggerFactory;
11 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
13 import java.io.IOException;
15 public class UnifiedCompositionMixPatternFullTest extends BaseFullTranslationTest {
17 private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
21 public void setUp() throws IOException {
22 // do not delete this function. it prevents the superclass setup from running
26 public ExpectedException exception = ExpectedException.none();
29 public void testMixPatterns() throws IOException {
31 "/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/in";
33 "/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/out";
35 testTranslationWithInit();
39 public void testMixPatternsWithConnectivityBetweenPatterns() throws IOException {
41 "/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/in";
43 "/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/out";
45 testTranslationWithInit();
49 public void testMixPatternsWithConnectivityAndMoreThanOneOccurenceForEachPattern()
52 "/mock/services/heattotosca/fulltest/mixPatterns/twoAppearancePerPatternWithConnectivities/in";
54 "/mock/services/heattotosca/fulltest/mixPatterns/twoAppearancePerPatternWithConnectivities/out";
56 testTranslationWithInit();
60 public void testDuplicateResourceIdsInDiffAddOnFiles() throws IOException {
61 exception.expect(CoreException.class);
62 exception.expectMessage("Resource with id lb_0_int_oam_int_0_port occurs more " +
63 "than once in different addOn files");
66 "/mock/services/heattotosca/fulltest/mixPatterns/duplicateResourceIdsInDiffAddOnFiles/in";
67 testTranslationWithInit();
71 public void testMixPatternsWithDependencyConnectivity() throws IOException {
73 "/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/in";
75 "/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/out";
77 testTranslationWithInit();