Copy entry_defintion_type to TOSCA.meta
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / java / org / openecomp / sdc / translator / services / heattotosca / impl / functiontranslation / FunctionTranslationGetFileImplTest.java
index 76f0c61..847a88c 100644 (file)
 
 package org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation;
 
-import static org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation.FunctionTranslator.getFunctionTranslateTo;
-
-import java.util.HashMap;
-import java.util.List;
-
 import org.junit.Assert;
 import org.junit.Test;
 import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
 import org.openecomp.core.utilities.file.FileUtils;
 import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.tosca.csar.AsdPackageHelper;
+import org.openecomp.sdc.tosca.csar.ManifestUtils;
 import org.openecomp.sdc.tosca.services.ToscaConstants;
 import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
 import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
 import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
 import org.openecomp.sdc.translator.services.heattotosca.FunctionTranslationFactory;
 
+import java.util.HashMap;
+import java.util.List;
+
+import static org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation.FunctionTranslator.getFunctionTranslateTo;
+
 public class FunctionTranslationGetFileImplTest {
   @Test
   public void testGetFileWithExtensionFunction() {
@@ -81,7 +83,7 @@ public class FunctionTranslationGetFileImplTest {
       Assert.assertNotNull(nodeTemplate.getArtifacts());
       Assert.assertNotNull(
           nodeTemplate.getArtifacts().get(FileUtils.getFileWithoutExtention((String) function)));
-      ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+      ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl(new AsdPackageHelper(new ManifestUtils()));
       Assert.assertEquals(
           nodeTemplate.getArtifacts().get(FileUtils.getFileWithoutExtention((String) function))
               .getFile(), "../" + toscaFileOutputService.getArtifactsFolderName() + "/" + function);