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() {
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);