summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jung2011-07-18 15:06:54 (EDT)
committerThomas Jung2011-07-18 15:06:54 (EDT)
commiteab7b3140639a35268d72c0dffeb61c0c122c0cf (patch)
treec1accc30446c72a16e5f96f1d094b4c4f13cfd4d
parentb5ed0781f4a6fc86fc4a730d0ec6a38f853fdfdc (diff)
downloadorg.eclipse.etrice-eab7b3140639a35268d72c0dffeb61c0c122c0cf.zip
org.eclipse.etrice-eab7b3140639a35268d72c0dffeb61c0c122c0cf.tar.gz
org.eclipse.etrice-eab7b3140639a35268d72c0dffeb61c0c122c0cf.tar.bz2
[integration.tests] Integration test sending data by value added
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestSendingDataByValue.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestSendingDataByValue.java b/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestSendingDataByValue.java
new file mode 100644
index 0000000..85bb9df
--- /dev/null
+++ b/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestSendingDataByValue.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tieto Deutschland Gmbh (http://www.tieto.com).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Jung
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.integration.tests;
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.eclipse.etrice.integration.SendingDataByValueTest.SubSys_SendingData;
+import org.eclipse.etrice.integration.tests.base.IntegrationTestBase;
+import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+
+public class IntegrationTestSendingDataByValue extends IntegrationTestBase {
+ @Before
+ public void setUp() throws Exception {
+ // we have to launch a JUnit Plugin test since for the build we need an Eclipse environment
+ // in this context the Mwe2Launcher suffers from https://bugs.eclipse.org/bugs/show_bug.cgi?id=318721
+ /*
+ Mwe2Launcher.main(new String[]{"/org.eclipse.etrice.integration.tests/src/de/protos/etrice/integration/test/IntegrationTestFSMGenerator.mwe2"});
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ final IProject project = workspace.getRoot().getProject("/org.eclipse.etrice.integration.tests");
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ */
+ }
+
+ @Test (timeout=5000)
+ public void testSendingDataByValue(){
+ SubSys_SendingData main_component = new SubSys_SendingData(null,"MainComponent");
+
+ // hand over the semaphore to the subsystem
+ main_component.setTestSemaphore(this.testSem);
+
+ main_component.init(); // lifecycle init
+ main_component.start(); // lifecycle start
+
+ waitForTestcase();
+
+ assertEquals(0,main_component.getTestErrorCode());
+
+ // end the lifecycle
+ main_component.stop(); // lifecycle stop
+ main_component.destroy(); // lifecycle destroy
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+
+}