blob: 4feef0e0941ee85d358cd2ffffe32f2153ea83cc (
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
54
|
package org.openecomp.sdc.translator.impl.heattotosca.parameters;
import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
import org.junit.Test;
public class HeatParameterConversionTest extends BaseResourceTranslationTest {
{
inputFilesPath = "/mock/heat/parameters/inputs";
outputFilesPath = "/mock/heat/parameters/expectedoutputfiles";
}
@Test
public void testTranslate() throws Exception {
testTranslation();
}
/*
private static final String MANIFEST_NAME = "MANIFEST.json";
@Test
public void testTranslate_parameters() throws IOException {
HeatToToscaTranslator heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
URL url = this.getClass().getResource("/mock/heat/parameters");
File manifestFile = new File(url.getPath());
File[] files = manifestFile.listFiles();
FileInputStream fis;
byte[] fileContent;
for (File file : files) {
fis = new FileInputStream(file);
fileContent = FileUtils.toByteArray(fis);
if (file.getName().equals(MANIFEST_NAME)) {
heatToToscaTranslator.addManifest(MANIFEST_NAME, new String(fileContent));
} else {
heatToToscaTranslator.addFile(file.getName(), fileContent);
}
}
TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
Assert.assertNotNull(translatorOutput);
File file = new File("Parameters.zip");
FileOutputStream fos = new FileOutputStream(file);
fos.write(translatorOutput.getTranslationContent());
fos.close();
}
*/
}
|