Browse Source

Issue 81, Test empty transition between simple states

bohl@itemis.de 10 years ago
parent
commit
8c68f1b01c
22 changed files with 530 additions and 11 deletions
  1. 26 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransition/EmptyTransition.cc
  2. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransition/EmptyTransition.sgen
  3. 12 0
      test-plugins/org.yakindu.sct.generator.c.test/model/test.sgen
  4. 3 3
      test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/AllTests.java
  5. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/EmptyTransition.java
  6. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransition.sgen
  7. 23 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransitionTest.cc
  8. 13 0
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen
  9. 3 2
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTestsTest.java
  10. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/EmptyTransitionTest.java
  11. 12 0
      test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen
  12. 121 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/emptytransition/EmptyTransitionStatemachine.java
  13. 6 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/emptytransition/IEmptyTransitionStatemachine.java
  14. 4 3
      test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java
  15. 46 0
      test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/EmptyTransitionTest.java
  16. 7 0
      test-plugins/org.yakindu.sct.simulation.core.sexec.test/model/test.sgen
  17. 3 2
      test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/simulation/core/sexec/test/AllTestsTest.java
  18. 43 0
      test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/simulation/core/sexec/test/EmptyTransitionTest.java
  19. 1 0
      test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs
  20. 100 0
      test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/EmptyTransition.sct
  21. 2 1
      test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit
  22. 11 0
      test-plugins/org.yakindu.sct.test.models/tests/EmptyTransition.sctunit

+ 26 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransition/EmptyTransition.cc

@@ -0,0 +1,26 @@
+/**
+* Copyright (c) 2015 committers of YAKINDU and others.
+* 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:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "EmptyTransition.h"
+
+
+EmptyTransition handle;
+
+TEST(StatemachineTest, EmptyTransitionTest) {
+	emptyTransition_init(&handle);
+	emptyTransition_enter(&handle);
+	emptyTransition_runCycle(&handle);
+	EXPECT_TRUE(!emptyTransition_isActive(&handle, EmptyTransition_main_region_B));
+	EXPECT_TRUE(emptyTransition_isActive(&handle, EmptyTransition_main_region_A));
+}
+
+		

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransition/EmptyTransition.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart EmptyTransition {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "EmptyTransition"
+		}
+	}
+}

+ 12 - 0
test-plugins/org.yakindu.sct.generator.c.test/model/test.sgen

@@ -168,6 +168,18 @@ GeneratorModel for sctunit::c {
 			WrapToJUnit =  "true" 
 		}			
 	}
+	
+	test EmptyTransition{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.c.test" 
+			targetFolder = "test-gen"			
+		}		
+				
+		feature JUnitWrapper {
+			WrapToJUnit =  "true" 
+		}			
+	}
 		
 	test EnterState{
 		

+ 3 - 3
test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/AllTests.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2014 committers of YAKINDU and others.
+ * Copyright (c) 2015 committers of YAKINDU and others.
  * 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
@@ -18,8 +18,8 @@ import org.junit.runners.Suite.SuiteClasses;
 		BitExpressions.class, BooleanExpressions.class, CastExpressions.class,
 		Choice.class, CKeywords.class, ConditionalExpression.class,
 		ConstantsTests.class, Declarations.class, DeepEntry.class,
-		DeepHistory.class, DynamicChoice.class, EnterState.class,
-		EntryChoice.class, EntryExitSelfTransition.class,
+		DeepHistory.class, DynamicChoice.class, EmptyTransition.class,
+		EnterState.class, EntryChoice.class, EntryExitSelfTransition.class,
 		ExitOnSelfTransition.class, ExitState.class, FeatureCalls.class,
 		Guard.class, GuardedEntry.class, GuardedExit.class,
 		HistoryWithExitPoint.class, HistoryWithoutInitialStep.class,

+ 39 - 0
test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/EmptyTransition.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2015 committers of YAKINDU and others.
+ * 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:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/EmptyTransition/EmptyTransition.cc", program = "gtests/EmptyTransition/EmptyTransition", model = "testmodels/SCTUnit/EmptyTransition.sct")
+@RunWith(GTestRunner.class)
+public class EmptyTransition {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransition.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart EmptyTransition {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "EmptyTransitionTest"
+		}
+	}
+}

+ 23 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransitionTest.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2015 committers of YAKINDU and others.
+* 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:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "EmptyTransition.h"
+
+TEST(StatemachineTest, EmptyTransitionTest) {
+	EmptyTransition* statechart = new EmptyTransition();
+	statechart->init();
+	statechart->enter();
+	statechart->runCycle();
+	EXPECT_TRUE(!statechart->isActive(EmptyTransition::main_region_B));
+	EXPECT_TRUE(statechart->isActive(EmptyTransition::main_region_A));
+	delete statechart;
+}

+ 13 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen

@@ -169,6 +169,19 @@ GeneratorModel for sctunit::cpp {
 		}		
 	}
 	
+	
+	test EmptyTransition{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+		
+		feature JUnitWrapper {
+			WrapToJUnit =  "true"
+		}		
+	}
+	
 	test EntryChoice{
 		
 		feature Outlet{ 

+ 3 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTestsTest.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2014 committers of YAKINDU and others.
+ * Copyright (c) 2015 committers of YAKINDU and others.
  * 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
@@ -19,7 +19,8 @@ import org.junit.runners.Suite.SuiteClasses;
 		CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class,
 		ConditionalExpressionTest.class, ConstantsTestsTest.class,
 		DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class,
-		DynamicChoiceTest.class, EnterStateTest.class, EntryChoiceTest.class,
+		DynamicChoiceTest.class, EmptyTransitionTest.class,
+		EnterStateTest.class, EntryChoiceTest.class,
 		EntryExitSelfTransitionTest.class, ExitOnSelfTransitionTest.class,
 		ExitStateTest.class, FeatureCallsTest.class, GuardTest.class,
 		GuardedEntryTest.class, GuardedExitTest.class,

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/EmptyTransitionTest.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2015 committers of YAKINDU and others.
+ * 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:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.cpp.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/EmptyTransitionTest/EmptyTransitionTest.cc", program = "gtests/EmptyTransitionTest/EmptyTransition", model = "testmodels/SCTUnit/EmptyTransition.sct")
+@RunWith(GTestRunner.class)
+public class EmptyTransitionTest {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 12 - 0
test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen

@@ -155,6 +155,18 @@ GeneratorModel for yakindu::java {
 			RuntimeService = true
 		}
 	}
+	
+	statechart EmptyTransition {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
 			
 	statechart EnterState {
 		feature Outlet {

+ 121 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/emptytransition/EmptyTransitionStatemachine.java

@@ -0,0 +1,121 @@
+package org.yakindu.scr.emptytransition;
+
+public class EmptyTransitionStatemachine
+		implements
+			IEmptyTransitionStatemachine {
+
+	static {
+	}
+
+	public enum State {
+		main_region_A, main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public EmptyTransitionStatemachine() {
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+
+	}
+
+	public void enter() {
+		entryAction();
+
+		nextStateIndex = 0;
+		stateVector[0] = State.main_region_A;
+	}
+
+	public void exit() {
+		switch (stateVector[0]) {
+			case main_region_A :
+				nextStateIndex = 0;
+				stateVector[0] = State.$NullState$;
+				break;
+
+			case main_region_B :
+				nextStateIndex = 0;
+				stateVector[0] = State.$NullState$;
+				break;
+
+			default :
+				break;
+		}
+
+		exitAction();
+	}
+
+	/**
+	 * This method resets the incoming events (time events included).
+	 */
+	protected void clearEvents() {
+
+	}
+
+	/**
+	 * This method resets the outgoing events.
+	 */
+	protected void clearOutEvents() {
+	}
+
+	/**
+	 * Returns true if the given state is currently active otherwise false.
+	 */
+	public boolean isStateActive(State state) {
+		switch (state) {
+			case main_region_A :
+				return stateVector[0] == State.main_region_A;
+			case main_region_B :
+				return stateVector[0] == State.main_region_B;
+			default :
+				return false;
+		}
+	}
+
+	/* Entry action for statechart 'EmptyTransition'. */
+	private void entryAction() {
+	}
+
+	/* Exit action for state 'EmptyTransition'. */
+	private void exitAction() {
+	}
+
+	/* The reactions of state A. */
+	private void reactMain_region_A() {
+	}
+
+	/* The reactions of state B. */
+	private void reactMain_region_B() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case main_region_A :
+					reactMain_region_A();
+					break;
+				case main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 6 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/emptytransition/IEmptyTransitionStatemachine.java

@@ -0,0 +1,6 @@
+package org.yakindu.scr.emptytransition;
+import org.yakindu.scr.IStatemachine;
+
+public interface IEmptyTransitionStatemachine extends IStatemachine {
+
+}

+ 4 - 3
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2014 committers of YAKINDU and others.
+ * Copyright (c) 2015 committers of YAKINDU and others.
  * 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
@@ -16,10 +16,11 @@ import org.junit.runners.Suite.SuiteClasses;
 @RunWith(Suite.class)
 @SuiteClasses({AlwaysOncycleTest.class, AssignmentAsExpressionTest.class,
 		BitExpressionsTest.class, BooleanExpressionsTest.class,
-		CastExpressionsTest.class, ChoiceTest.class,
+		CastExpressionsTest.class, ChoiceTest.class, 
 		ConditionalExpressionTest.class,
 		DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class,
-		DynamicChoiceTest.class, EnterStateTest.class, EntryChoiceTest.class,
+		DynamicChoiceTest.class, EmptyTransitionTest.class,
+		EnterStateTest.class, EntryChoiceTest.class,
 		EntryExitSelfTransitionTest.class, ExitOnSelfTransitionTest.class,
 		ExitStateTest.class, FeatureCallsTest.class, GuardTest.class,
 		GuardedEntryTest.class, GuardedExitTest.class,

+ 46 - 0
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/EmptyTransitionTest.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2015 committers of YAKINDU and others.
+ * 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:
+ *     committers of YAKINDU - initial API and implementation
+ */
+
+package org.yakindu.sct.generator.java.test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.yakindu.scr.emptytransition.EmptyTransitionStatemachine;
+import org.yakindu.scr.emptytransition.EmptyTransitionStatemachine.State;
+/**
+ *  Unit TestCase for EmptyTransition
+ */
+@SuppressWarnings("all")
+public class EmptyTransitionTest {
+
+	private EmptyTransitionStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new EmptyTransitionStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testEmptyTransitionTest() {
+		statemachine.enter();
+		statemachine.runCycle();
+		assertTrue(!statemachine.isStateActive(State.main_region_B));
+		assertTrue(statemachine.isStateActive(State.main_region_A));
+	}
+}

+ 7 - 0
test-plugins/org.yakindu.sct.simulation.core.sexec.test/model/test.sgen

@@ -112,6 +112,13 @@ GeneratorModel for sctunit::interpreter {
 		}			
 	}
 	
+	test EmptyTransition{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.simulation.core.sexec.test" 
+			targetFolder = "test-gen"			
+		}
+	}
 	
 	
 	test EnterState{

+ 3 - 2
test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/simulation/core/sexec/test/AllTestsTest.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2014 committers of YAKINDU and others.
+ * Copyright (c) 2015 committers of YAKINDU and others.
  * 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
@@ -20,7 +20,8 @@ import org.junit.runners.Suite.SuiteClasses;
 		CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class,
 		ConditionalExpressionTest.class, ConstantsTestsTest.class,
 		DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class,
-		DynamicChoiceTest.class, EnterStateTest.class, EntryChoiceTest.class,
+		DynamicChoiceTest.class, EmptyTransitionTest.class,
+		EnterStateTest.class, EntryChoiceTest.class,
 		EntryExitSelfTransitionTest.class, ExitOnSelfTransitionTest.class,
 		ExitStateTest.class, FeatureCallsTest.class, GuardTest.class,
 		GuardedEntryTest.class, GuardedExitTest.class,

+ 43 - 0
test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/simulation/core/sexec/test/EmptyTransitionTest.java

@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2015 committers of YAKINDU and others.
+ * 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:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.simulation.core.sexec.test;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sexec.ExecutionFlow;
+import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
+import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
+import org.yakindu.sct.test.models.SCTUnitTestModels;
+import com.google.inject.Inject;
+import static org.junit.Assert.assertTrue;
+/**
+ *  Unit TestCase for EmptyTransition
+ */
+@SuppressWarnings("all")
+@RunWith(XtextRunner.class)
+@InjectWith(SExecInjectionProvider.class)
+public class EmptyTransitionTest extends AbstractExecutionFlowTest {
+	@Before
+	public void setup() throws Exception {
+		ExecutionFlow flow = models
+				.loadExecutionFlowFromResource("EmptyTransition.sct");
+		initInterpreter(flow);
+	}
+	@Test
+	public void EmptyTransitionTest() throws Exception {
+		interpreter.enter();
+		interpreter.runCycle();
+		assertTrue(!isActive("B"));
+		assertTrue(isActive("A"));
+	}
+}

+ 1 - 0
test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs

@@ -5,6 +5,7 @@ encoding//testmodels/SCTUnit/ConditionalExpressions.sct=UTF-8
 encoding//testmodels/SCTUnit/Declarations.sct=UTF-8
 encoding//testmodels/SCTUnit/DeepEntry.sct=UTF-8
 encoding//testmodels/SCTUnit/DynamicChoice.sct=UTF-8
+encoding//testmodels/SCTUnit/EmptyTransition.sct=UTF-8
 encoding//testmodels/SCTUnit/EnterState.sct=UTF-8
 encoding//testmodels/SCTUnit/ExitOnSelfTransition.sct=UTF-8
 encoding//testmodels/SCTUnit/ExitState.sct=UTF-8

+ 100 - 0
test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/EmptyTransition.sct

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_LuL4IKVUEeScuOFVbGbKIg" name="EmptyTransition">
+    <regions xmi:id="_LuNGQqVUEeScuOFVbGbKIg" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_LuQwpqVUEeScuOFVbGbKIg">
+        <outgoingTransitions xmi:id="_LuSl1qVUEeScuOFVbGbKIg" target="_LuR-wKVUEeScuOFVbGbKIg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_LuR-wKVUEeScuOFVbGbKIg" name="A" incomingTransitions="_LuSl1qVUEeScuOFVbGbKIg">
+        <outgoingTransitions xmi:id="_M20UIKVUEeScuOFVbGbKIg" specification="" target="_Me5jYKVUEeScuOFVbGbKIg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_Me5jYKVUEeScuOFVbGbKIg" name="B" incomingTransitions="_M20UIKVUEeScuOFVbGbKIg"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_LuNGQKVUEeScuOFVbGbKIg" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_LuL4IKVUEeScuOFVbGbKIg" measurementUnit="Pixel">
+    <children xmi:id="_LuO7cKVUEeScuOFVbGbKIg" type="Region" element="_LuNGQqVUEeScuOFVbGbKIg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LuQwoKVUEeScuOFVbGbKIg" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LuQwoaVUEeScuOFVbGbKIg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LuQwoqVUEeScuOFVbGbKIg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_LuQwo6VUEeScuOFVbGbKIg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_LuRXsKVUEeScuOFVbGbKIg" type="Entry" element="_LuQwpqVUEeScuOFVbGbKIg">
+          <children xmi:id="_LuRXs6VUEeScuOFVbGbKIg" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_LuRXtqVUEeScuOFVbGbKIg" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_LuRXt6VUEeScuOFVbGbKIg"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_LuRXuKVUEeScuOFVbGbKIg"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_LuRXtKVUEeScuOFVbGbKIg" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuRXtaVUEeScuOFVbGbKIg"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_LuRXsaVUEeScuOFVbGbKIg" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuRXuaVUEeScuOFVbGbKIg" x="70" y="20"/>
+        </children>
+        <children xmi:id="_LuR-w6VUEeScuOFVbGbKIg" type="State" element="_LuR-wKVUEeScuOFVbGbKIg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_LuR-x6VUEeScuOFVbGbKIg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_LuR-yKVUEeScuOFVbGbKIg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_LuR-yaVUEeScuOFVbGbKIg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_LuSl0KVUEeScuOFVbGbKIg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_LuSl0aVUEeScuOFVbGbKIg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuSl0qVUEeScuOFVbGbKIg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_LuSl06VUEeScuOFVbGbKIg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_LuR-xKVUEeScuOFVbGbKIg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_LuR-xaVUEeScuOFVbGbKIg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_LuSl1KVUEeScuOFVbGbKIg" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuSl1aVUEeScuOFVbGbKIg" x="40" y="80"/>
+        </children>
+        <children xmi:id="_Me8msKVUEeScuOFVbGbKIg" type="State" element="_Me5jYKVUEeScuOFVbGbKIg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_Me900KVUEeScuOFVbGbKIg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Me900aVUEeScuOFVbGbKIg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_Me-b4KVUEeScuOFVbGbKIg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Me-b4aVUEeScuOFVbGbKIg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_Me-b4qVUEeScuOFVbGbKIg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Me-b46VUEeScuOFVbGbKIg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Me_C8KVUEeScuOFVbGbKIg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Me8msaVUEeScuOFVbGbKIg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_Me8msqVUEeScuOFVbGbKIg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_Me_qAKVUEeScuOFVbGbKIg" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Me8ms6VUEeScuOFVbGbKIg" x="279" y="80"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuQwpKVUEeScuOFVbGbKIg"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_LuO7caVUEeScuOFVbGbKIg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuQwpaVUEeScuOFVbGbKIg" x="220" y="10" width="400" height="400"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_LuTz86VUEeScuOFVbGbKIg" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LuTz9aVUEeScuOFVbGbKIg" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LuTz9qVUEeScuOFVbGbKIg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LuTz96VUEeScuOFVbGbKIg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_LuTz-KVUEeScuOFVbGbKIg" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuTz-aVUEeScuOFVbGbKIg"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LuUbAKVUEeScuOFVbGbKIg" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_LuNGQaVUEeScuOFVbGbKIg"/>
+    <edges xmi:id="_LuTM4KVUEeScuOFVbGbKIg" type="Transition" element="_LuSl1qVUEeScuOFVbGbKIg" source="_LuRXsKVUEeScuOFVbGbKIg" target="_LuR-w6VUEeScuOFVbGbKIg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LuTz8KVUEeScuOFVbGbKIg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LuTz8aVUEeScuOFVbGbKIg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LuTz8qVUEeScuOFVbGbKIg" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_LuTM4aVUEeScuOFVbGbKIg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_LuTM46VUEeScuOFVbGbKIg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_LuTM4qVUEeScuOFVbGbKIg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_M23XcKVUEeScuOFVbGbKIg" type="Transition" element="_M20UIKVUEeScuOFVbGbKIg" source="_LuR-w6VUEeScuOFVbGbKIg" target="_Me8msKVUEeScuOFVbGbKIg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_M24lkKVUEeScuOFVbGbKIg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_M24lkaVUEeScuOFVbGbKIg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_M24lkqVUEeScuOFVbGbKIg" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_M23XcaVUEeScuOFVbGbKIg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_M23-gKVUEeScuOFVbGbKIg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_M23XcqVUEeScuOFVbGbKIg" points="[18, 7, -239, 7]$[249, 24, -8, 24]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

+ 2 - 1
test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit

@@ -12,9 +12,10 @@ testsuite AllTests {
 	DeepEntry,
 	DeepHistory,
 	DynamicChoice,
+	EmptyTransition, 
 	EnterState,
 	EntryChoice,
-	EntryExitSelfTransition, 
+	EntryExitSelfTransition,
 	ExitOnSelfTransition, 
 	ExitState,
 	FeatureCalls,

+ 11 - 0
test-plugins/org.yakindu.sct.test.models/tests/EmptyTransition.sctunit

@@ -0,0 +1,11 @@
+
+testgroup EmptyTransition for statechart EmptyTransition{
+	test EmptyTransitionTest { 
+		enter
+		cycle
+		assert !active (EmptyTransition.main_region.B)
+		assert active  (EmptyTransition.main_region.A) 
+		 
+	} 
+}
+