1
2
3
4
5
6
7
8
9
10
11
12
13 package org.eclipse.papyrus.designer.transformation.languages.cpp.tests;
14
15 import org.eclipse.core.resources.IProject;
16 import org.eclipse.papyrus.designer.languages.common.testutils.TestConstants;
17 import org.eclipse.papyrus.designer.languages.common.testutils.TransformationTestSupport;
18 import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
19 import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
20 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
21 import org.junit.ClassRule;
22 import org.junit.Rule;
23 import org.junit.Test;
24
25 @PluginResource("org.eclipse.papyrus.designer.transformation.languages.cpp.library:/models/examples/HelloWorldCpp/HelloWorldCpp.di")
26 public class TestHelloWorldCppExample {
27
28 @SuppressWarnings("nls")
29 public static final String HELLO_WORLD_CPP_DEFAULT_NODE = "HelloWorldCpp_defaultNode_SystemDepPlan";
30
31 @SuppressWarnings("nls")
32 public static final String DEPLOYMENT_MONO_PULL = "HelloWorldCpp::deployment::SystemDepPlan";
33
34 @Rule
35
36 public final PapyrusEditorFixture modelSetFixture = new PapyrusEditorFixture();
37
38 @ClassRule
39 public static HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
40
41 @Test
42 public void testProducerConsumerMonoPull() throws InterruptedException {
43
44 TransformationTestSupport tts = new TransformationTestSupport(this.getClass(), houseKeeper, modelSetFixture);
45
46
47 IProject genProject = houseKeeper.createProject(HELLO_WORLD_CPP_DEFAULT_NODE);
48
49
50 tts.runTransformation(DEPLOYMENT_MONO_PULL);
51
52 tts.validateResults(genProject, TestConstants.EXPECTED_RESULT + TestConstants.FILE_SEP +
53 HELLO_WORLD_CPP_DEFAULT_NODE + TestConstants.FILE_SEP + TestConstants.SRC_GEN, TestConstants.SRC_GEN);
54 }
55
56 }