summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjung2011-06-29 02:58:35 (EDT)
committertjung2011-06-29 02:58:35 (EDT)
commitebaab6164e574f31e56142bb57c118d573d6f9e1 (patch)
tree7b04f80b747f3097b1e62aa8d3b610980b8df5df
parent11fea1b36026f3eb9349d5ca1c3c12eddee31f12 (diff)
downloadorg.eclipse.etrice-ebaab6164e574f31e56142bb57c118d573d6f9e1.zip
org.eclipse.etrice-ebaab6164e574f31e56142bb57c118d573d6f9e1.tar.gz
org.eclipse.etrice-ebaab6164e574f31e56142bb57c118d573d6f9e1.tar.bz2
First release Integration test of "isHandler" feature
-rw-r--r--tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestHandler.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestHandler.java b/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestHandler.java
new file mode 100644
index 0000000..8d35f6a
--- /dev/null
+++ b/tests/org.eclipse.etrice.integration.tests/src/org/eclipse/etrice/integration/tests/IntegrationTestHandler.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
+ *
+ * Autor:
+ * Thomas Jung
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.integration.tests;
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.eclipse.etrice.integration.HandlerTest.SubSystem_HandlerTest;
+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 IntegrationTestHandler 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 testHandler(){
+ SubSystem_HandlerTest main_component = new SubSystem_HandlerTest(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 {
+ }
+
+
+}