2 * Copyright (c) 2017 ZTE Corporation.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * and the Apache License 2.0 which both accompany this distribution,
\r
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
\r
7 * and http://www.apache.org/licenses/LICENSE-2.0
\r
10 * ZTE - initial API and implementation and/or initial documentation
\r
12 package org.onap.sdc.workflowdesigner.convert;
\r
14 import static org.junit.Assert.assertTrue;
\r
16 import java.io.File;
\r
17 import java.net.URI;
\r
18 import java.nio.file.Paths;
\r
20 import org.apache.velocity.exception.ParseErrorException;
\r
21 import org.apache.velocity.exception.ResourceNotFoundException;
\r
22 import org.junit.Test;
\r
23 import org.onap.sdc.workflowdesigner.converter.Bpmn4Tosca2Bpmn;
\r
25 public class BPMN4Tosca2BpmnTest {
\r
26 private static String RESOURCES_DIR = "src/test/resources/workflow";
\r
29 public void testTransform() throws ResourceNotFoundException, ParseErrorException, Exception {
\r
31 URI srcUri = Paths.get(RESOURCES_DIR, "workflow.json").toUri();
\r
32 URI targetUri = Paths.get(RESOURCES_DIR, "bpmnworkflow.bpmn20.xml").toUri();
\r
33 BPMN4Tosca2BpmnTest.class.getResource(".");
\r
34 Bpmn4Tosca2Bpmn transformer = new Bpmn4Tosca2Bpmn();
\r
35 transformer.transform("transformTest", srcUri, targetUri);
\r
36 assertTrue(new File(targetUri.getPath()).exists());
\r