d256753b90a4093a4f2377252c0e08b80c56b91f
[sdc.git] /
1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
2
3 import org.junit.Rule;
4 import org.junit.Test;
5 import org.junit.rules.ExpectedException;
6 import org.openecomp.sdc.common.errors.CoreException;
7 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
8
9 import java.io.IOException;
10
11 public class UnifiedCompositionMixPatternFullTest extends BaseFullTranslationTest {
12
13   private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/mixPatterns/";
14
15   @Rule
16   public ExpectedException exception = ExpectedException.none();
17
18   @Test
19   public void testMixPatterns() throws IOException {
20     testTranslationWithInit(BASE_DIRECTORY + "oneAppearancePerPattern");
21   }
22
23   @Test
24   public void testMixPatternsWithConnectivityBetweenPatterns() throws IOException {
25     testTranslationWithInit(BASE_DIRECTORY + "connectivityBetweenPatterns");
26   }
27
28   @Test
29   public void testMixPatternsWithConnectivityAndMoreThanOneOccurenceForEachPattern()
30       throws IOException {
31     testTranslationWithInit(BASE_DIRECTORY + "twoAppearancePerPatternWithConnectivities");
32   }
33
34   @Test
35   public void testDuplicateResourceIdsInDiffAddOnFiles() throws IOException {
36     exception.expect(CoreException.class);
37     exception.expectMessage("Resource with id lb_0_int_oam_int_0_port occurs more " +
38         "than once in different addOn files");
39
40     testTranslationWithInit(BASE_DIRECTORY + "duplicateResourceIdsInDiffAddOnFiles");
41   }
42
43   @Test
44   public void testMixPatternsWithDependencyConnectivity() throws IOException {
45     testTranslationWithInit(BASE_DIRECTORY + "dependencyConnectivity");
46   }
47
48 }