import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.onap.sdnc.config.params.data.PropertyDefinition;
+import org.onap.sdnc.config.params.transformer.ArtificatTransformer;
import org.onap.sdnc.config.params.transformer.tosca.exceptions.ArtifactProcessorException;
public class TestArtifactProcessor {
String toscaString = outstream.toString();
}
+ @Test
+ public void testReadArtifact() throws IOException, ArtifactProcessorException {
+ ArtifactProcessor arp = ArtifactProcessorFactory.getArtifactProcessor();
+ String pdString = getFileContent("tosca/ExpectedTosca.yml");
+ PropertyDefinition propertyDefinitionObj = arp.readArtifact(pdString);
+ Assert.assertEquals(7, propertyDefinitionObj.getParameters().size());
+ }
+
private String getFileContent(String fileName) throws IOException {
ClassLoader classLoader = new TestArtifactProcessor().getClass().getClassLoader();
InputStream is = new FileInputStream(classLoader.getResource(fileName).getFile());