Forráskód Böngészése

regenerated java generator tests

Axel Terfloth 9 éve
szülő
commit
0c6b03cac7

+ 0 - 308
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/actionoutgoingtransitionsinitialstate/ActionOutgoingTransitionsInitialStateStatemachine.java

@@ -1,308 +0,0 @@
-package org.yakindu.scr.actionoutgoingtransitionsinitialstate;
-
-public class ActionOutgoingTransitionsInitialStateStatemachine
-		implements
-			IActionOutgoingTransitionsInitialStateStatemachine {
-
-	protected class SCInterfaceImpl implements SCInterface {
-
-		private long internalB;
-
-		public long getInternalB() {
-			return internalB;
-		}
-
-		public void setInternalB(long value) {
-			this.internalB = value;
-		}
-
-		private long c;
-
-		public long getC() {
-			return c;
-		}
-
-		public void setC(long value) {
-			this.c = value;
-		}
-
-		private long d;
-
-		public long getD() {
-			return d;
-		}
-
-		public void setD(long value) {
-			this.d = value;
-		}
-
-	}
-
-	protected SCInterfaceImpl sCInterface;
-
-	private boolean initialized = false;
-
-	public enum State {
-		region_1__1, region_2__1, region_2__1_r1__2, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	private long b;
-
-	protected void setB(long value) {
-		b = value;
-	}
-
-	protected long getB() {
-		return b;
-	}
-
-	public ActionOutgoingTransitionsInitialStateStatemachine() {
-
-		sCInterface = new SCInterfaceImpl();
-	}
-
-	public void init() {
-		this.initialized = true;
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-
-		sCInterface.setInternalB(0);
-
-		sCInterface.setC(0);
-
-		sCInterface.setD(0);
-
-		setB(0);
-	}
-
-	public void enter() {
-		if (!initialized)
-			throw new IllegalStateException(
-					"The statemachine needs to be initialized first by calling the init() function.");
-
-		enterSequence_region_1_default();
-
-		enterSequence_region_2_default();
-	}
-
-	public void exit() {
-		exitSequence_region_1();
-
-		exitSequence_region_2();
-	}
-
-	/**
-	 * @see IStatemachine#isActive()
-	 */
-	public boolean isActive() {
-
-		return stateVector[0] != State.$NullState$ || stateVector[1] != State.$NullState$;
-	}
-
-	/** 
-	* Always returns 'false' since this state machine can never become final.
-	*
-	 * @see IStatemachine#isFinal() 
-	 */
-	public boolean isFinal() {
-		return false;
-	}
-
-	/**
-	* 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 region_1__1 :
-				return stateVector[0] == State.region_1__1;
-			case region_2__1 :
-				return stateVector[1].ordinal() >= State.region_2__1.ordinal()
-						&& stateVector[1].ordinal() <= State.region_2__1_r1__2.ordinal();
-			case region_2__1_r1__2 :
-				return stateVector[1] == State.region_2__1_r1__2;
-			default :
-				return false;
-		}
-	}
-
-	public SCInterface getSCInterface() {
-		return sCInterface;
-	}
-
-	public long getInternalB() {
-		return sCInterface.getInternalB();
-	}
-
-	public void setInternalB(long value) {
-		sCInterface.setInternalB(value);
-	}
-	public long getC() {
-		return sCInterface.getC();
-	}
-
-	public void setC(long value) {
-		sCInterface.setC(value);
-	}
-	public long getD() {
-		return sCInterface.getD();
-	}
-
-	public void setD(long value) {
-		sCInterface.setD(value);
-	}
-
-	/* Entry action for state '1'. */
-	private void entryAction_region_1__1() {
-		sCInterface.setInternalB(b);
-	}
-
-	/* 'default' enter sequence for state 1 */
-	private void enterSequence_region_1__1_default() {
-		entryAction_region_1__1();
-
-		nextStateIndex = 0;
-		stateVector[0] = State.region_1__1;
-	}
-
-	/* 'default' enter sequence for state 1 */
-	private void enterSequence_region_2__1_default() {
-		enterSequence_region_2__1_r1_default();
-	}
-
-	/* 'default' enter sequence for state 2 */
-	private void enterSequence_region_2__1_r1__2_default() {
-		nextStateIndex = 1;
-		stateVector[1] = State.region_2__1_r1__2;
-	}
-
-	/* 'default' enter sequence for region region 1 */
-	private void enterSequence_region_1_default() {
-		react_region_1__entry_Default();
-	}
-
-	/* 'default' enter sequence for region region 2 */
-	private void enterSequence_region_2_default() {
-		react_region_2__entry_Default();
-	}
-
-	/* 'default' enter sequence for region r1 */
-	private void enterSequence_region_2__1_r1_default() {
-		react_region_2__1_r1__entry_Default();
-	}
-
-	/* Default exit sequence for state 1 */
-	private void exitSequence_region_1__1() {
-		nextStateIndex = 0;
-		stateVector[0] = State.$NullState$;
-	}
-
-	/* Default exit sequence for state 2 */
-	private void exitSequence_region_2__1_r1__2() {
-		nextStateIndex = 1;
-		stateVector[1] = State.$NullState$;
-	}
-
-	/* Default exit sequence for region region 1 */
-	private void exitSequence_region_1() {
-		switch (stateVector[0]) {
-			case region_1__1 :
-				exitSequence_region_1__1();
-				break;
-
-			default :
-				break;
-		}
-	}
-
-	/* Default exit sequence for region region 2 */
-	private void exitSequence_region_2() {
-		switch (stateVector[1]) {
-			case region_2__1_r1__2 :
-				exitSequence_region_2__1_r1__2();
-				break;
-
-			default :
-				break;
-		}
-	}
-
-	/* Default exit sequence for region r1 */
-	private void exitSequence_region_2__1_r1() {
-		switch (stateVector[1]) {
-			case region_2__1_r1__2 :
-				exitSequence_region_2__1_r1__2();
-				break;
-
-			default :
-				break;
-		}
-	}
-
-	/* The reactions of state 1. */
-	private void react_region_1__1() {
-	}
-
-	/* The reactions of state 2. */
-	private void react_region_2__1_r1__2() {
-	}
-
-	/* Default react sequence for initial entry  */
-	private void react_region_1__entry_Default() {
-		enterSequence_region_1__1_default();
-	}
-
-	/* Default react sequence for initial entry  */
-	private void react_region_2__entry_Default() {
-		enterSequence_region_2__1_default();
-	}
-
-	/* Default react sequence for initial entry  */
-	private void react_region_2__1_r1__entry_Default() {
-		enterSequence_region_2__1_r1__2_default();
-	}
-
-	public void runCycle() {
-		if (!initialized)
-			throw new IllegalStateException(
-					"The statemachine needs to be initialized first by calling the init() function.");
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case region_1__1 :
-					react_region_1__1();
-					break;
-				case region_2__1_r1__2 :
-					react_region_2__1_r1__2();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}

+ 0 - 18
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/actionoutgoingtransitionsinitialstate/IActionOutgoingTransitionsInitialStateStatemachine.java

@@ -1,18 +0,0 @@
-package org.yakindu.scr.actionoutgoingtransitionsinitialstate;
-import org.yakindu.scr.IStatemachine;
-
-public interface IActionOutgoingTransitionsInitialStateStatemachine extends IStatemachine {
-
-	public interface SCInterface {
-		public long getInternalB();
-		public void setInternalB(long value);
-		public long getC();
-		public void setC(long value);
-		public long getD();
-		public void setD(long value);
-
-	}
-
-	public SCInterface getSCInterface();
-
-}

+ 513 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/entryreactionaction/EntryReactionActionStatemachine.java

@@ -0,0 +1,513 @@
+package org.yakindu.scr.entryreactionaction;
+
+public class EntryReactionActionStatemachine implements IEntryReactionActionStatemachine {
+
+	protected class SCInterfaceImpl implements SCInterface {
+
+		private boolean b;
+
+		public void raiseB() {
+			b = true;
+		}
+
+		private boolean d;
+
+		public void raiseD() {
+			d = true;
+		}
+
+		private boolean enteredR1;
+
+		public boolean getEnteredR1() {
+			return enteredR1;
+		}
+
+		public void setEnteredR1(boolean value) {
+			this.enteredR1 = value;
+		}
+
+		private boolean enteredR2;
+
+		public boolean getEnteredR2() {
+			return enteredR2;
+		}
+
+		public void setEnteredR2(boolean value) {
+			this.enteredR2 = value;
+		}
+
+		private boolean enteredBdefault;
+
+		public boolean getEnteredBdefault() {
+			return enteredBdefault;
+		}
+
+		public void setEnteredBdefault(boolean value) {
+			this.enteredBdefault = value;
+		}
+
+		private boolean enteredBother;
+
+		public boolean getEnteredBother() {
+			return enteredBother;
+		}
+
+		public void setEnteredBother(boolean value) {
+			this.enteredBother = value;
+		}
+
+		protected void clearEvents() {
+			b = false;
+			d = false;
+		}
+
+	}
+
+	protected SCInterfaceImpl sCInterface;
+
+	private boolean initialized = false;
+
+	public enum State {
+		r2_B, r2_B_r_BA, r2_B_r_BB, r2_D, r1_A, $NullState$
+	};
+
+	private State[] historyVector = new State[1];
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public EntryReactionActionStatemachine() {
+
+		sCInterface = new SCInterfaceImpl();
+	}
+
+	public void init() {
+		this.initialized = true;
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		for (int i = 0; i < 1; i++) {
+			historyVector[i] = State.$NullState$;
+		}
+		clearEvents();
+		clearOutEvents();
+
+		sCInterface.setEnteredR1(false);
+
+		sCInterface.setEnteredR2(false);
+
+		sCInterface.setEnteredBdefault(false);
+
+		sCInterface.setEnteredBother(false);
+	}
+
+	public void enter() {
+		if (!initialized)
+			throw new IllegalStateException(
+					"The statemachine needs to be initialized first by calling the init() function.");
+
+		enterSequence_r2_default();
+
+		enterSequence_r1_default();
+	}
+
+	public void exit() {
+		exitSequence_r2();
+
+		exitSequence_r1();
+	}
+
+	/**
+	 * @see IStatemachine#isActive()
+	 */
+	public boolean isActive() {
+
+		return stateVector[0] != State.$NullState$ || stateVector[1] != State.$NullState$;
+	}
+
+	/** 
+	* Always returns 'false' since this state machine can never become final.
+	*
+	 * @see IStatemachine#isFinal() 
+	 */
+	public boolean isFinal() {
+		return false;
+	}
+
+	/**
+	* This method resets the incoming events (time events included).
+	*/
+	protected void clearEvents() {
+		sCInterface.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 r2_B :
+				return stateVector[0].ordinal() >= State.r2_B.ordinal()
+						&& stateVector[0].ordinal() <= State.r2_B_r_BB.ordinal();
+			case r2_B_r_BA :
+				return stateVector[0] == State.r2_B_r_BA;
+			case r2_B_r_BB :
+				return stateVector[0] == State.r2_B_r_BB;
+			case r2_D :
+				return stateVector[0] == State.r2_D;
+			case r1_A :
+				return stateVector[1] == State.r1_A;
+			default :
+				return false;
+		}
+	}
+
+	public SCInterface getSCInterface() {
+		return sCInterface;
+	}
+
+	public void raiseB() {
+		sCInterface.raiseB();
+	}
+	public void raiseD() {
+		sCInterface.raiseD();
+	}
+
+	public boolean getEnteredR1() {
+		return sCInterface.getEnteredR1();
+	}
+
+	public void setEnteredR1(boolean value) {
+		sCInterface.setEnteredR1(value);
+	}
+	public boolean getEnteredR2() {
+		return sCInterface.getEnteredR2();
+	}
+
+	public void setEnteredR2(boolean value) {
+		sCInterface.setEnteredR2(value);
+	}
+	public boolean getEnteredBdefault() {
+		return sCInterface.getEnteredBdefault();
+	}
+
+	public void setEnteredBdefault(boolean value) {
+		sCInterface.setEnteredBdefault(value);
+	}
+	public boolean getEnteredBother() {
+		return sCInterface.getEnteredBother();
+	}
+
+	public void setEnteredBother(boolean value) {
+		sCInterface.setEnteredBother(value);
+	}
+
+	private boolean check_r2_B_tr0_tr0() {
+		return sCInterface.d;
+	}
+
+	private boolean check_r2_B_r_BA_tr0_tr0() {
+		return sCInterface.b;
+	}
+
+	private boolean check_r2_B_r_BB_tr0_tr0() {
+		return sCInterface.b;
+	}
+
+	private boolean check_r2_D_tr0_tr0() {
+		return sCInterface.b;
+	}
+
+	private boolean check_r2_D_tr1_tr1() {
+		return sCInterface.d;
+	}
+
+	private void effect_r2_B_tr0() {
+		exitSequence_r2_B();
+
+		enterSequence_r2_D_default();
+	}
+
+	private void effect_r2_B_r_BA_tr0() {
+		exitSequence_r2_B_r_BA();
+
+		enterSequence_r2_B_r_BB_default();
+	}
+
+	private void effect_r2_B_r_BB_tr0() {
+		exitSequence_r2_B_r_BB();
+
+		enterSequence_r2_B_r_BA_default();
+	}
+
+	private void effect_r2_D_tr0() {
+		exitSequence_r2_D();
+
+		enterSequence_r2_B_other();
+	}
+
+	private void effect_r2_D_tr1() {
+		exitSequence_r2_D();
+
+		enterSequence_r2_B_default();
+	}
+
+	/* 'default' enter sequence for state B */
+	private void enterSequence_r2_B_default() {
+		enterSequence_r2_B_r_default();
+	}
+
+	/* 'other' enter sequence for state B */
+	private void enterSequence_r2_B_other() {
+		enterSequence_r2_B_r_other();
+	}
+
+	/* 'default' enter sequence for state BA */
+	private void enterSequence_r2_B_r_BA_default() {
+		nextStateIndex = 0;
+		stateVector[0] = State.r2_B_r_BA;
+
+		historyVector[0] = stateVector[0];
+	}
+
+	/* 'default' enter sequence for state BB */
+	private void enterSequence_r2_B_r_BB_default() {
+		nextStateIndex = 0;
+		stateVector[0] = State.r2_B_r_BB;
+
+		historyVector[0] = stateVector[0];
+	}
+
+	/* 'default' enter sequence for state D */
+	private void enterSequence_r2_D_default() {
+		nextStateIndex = 0;
+		stateVector[0] = State.r2_D;
+	}
+
+	/* 'default' enter sequence for state A */
+	private void enterSequence_r1_A_default() {
+		nextStateIndex = 1;
+		stateVector[1] = State.r1_A;
+	}
+
+	/* 'default' enter sequence for region r2 */
+	private void enterSequence_r2_default() {
+		react_r2_default();
+	}
+
+	/* 'default' enter sequence for region r */
+	private void enterSequence_r2_B_r_default() {
+		react_r2_B_r_default();
+	}
+
+	/* 'other' enter sequence for region r */
+	private void enterSequence_r2_B_r_other() {
+		react_r2_B_r_other();
+	}
+
+	/* shallow enterSequence with history in child r */
+	private void shallowEnterSequence_r2_B_r() {
+		switch (historyVector[0]) {
+			case r2_B_r_BA :
+				enterSequence_r2_B_r_BA_default();
+				break;
+
+			case r2_B_r_BB :
+				enterSequence_r2_B_r_BB_default();
+				break;
+
+			default :
+				break;
+		}
+	}
+
+	/* 'default' enter sequence for region r1 */
+	private void enterSequence_r1_default() {
+		react_r1__entry_Default();
+	}
+
+	/* Default exit sequence for state B */
+	private void exitSequence_r2_B() {
+		exitSequence_r2_B_r();
+	}
+
+	/* Default exit sequence for state BA */
+	private void exitSequence_r2_B_r_BA() {
+		nextStateIndex = 0;
+		stateVector[0] = State.$NullState$;
+	}
+
+	/* Default exit sequence for state BB */
+	private void exitSequence_r2_B_r_BB() {
+		nextStateIndex = 0;
+		stateVector[0] = State.$NullState$;
+	}
+
+	/* Default exit sequence for state D */
+	private void exitSequence_r2_D() {
+		nextStateIndex = 0;
+		stateVector[0] = State.$NullState$;
+	}
+
+	/* Default exit sequence for state A */
+	private void exitSequence_r1_A() {
+		nextStateIndex = 1;
+		stateVector[1] = State.$NullState$;
+	}
+
+	/* Default exit sequence for region r2 */
+	private void exitSequence_r2() {
+		switch (stateVector[0]) {
+			case r2_B_r_BA :
+				exitSequence_r2_B_r_BA();
+				break;
+
+			case r2_B_r_BB :
+				exitSequence_r2_B_r_BB();
+				break;
+
+			case r2_D :
+				exitSequence_r2_D();
+				break;
+
+			default :
+				break;
+		}
+	}
+
+	/* Default exit sequence for region r */
+	private void exitSequence_r2_B_r() {
+		switch (stateVector[0]) {
+			case r2_B_r_BA :
+				exitSequence_r2_B_r_BA();
+				break;
+
+			case r2_B_r_BB :
+				exitSequence_r2_B_r_BB();
+				break;
+
+			default :
+				break;
+		}
+	}
+
+	/* Default exit sequence for region r1 */
+	private void exitSequence_r1() {
+		switch (stateVector[1]) {
+			case r1_A :
+				exitSequence_r1_A();
+				break;
+
+			default :
+				break;
+		}
+	}
+
+	/* The reactions of state BA. */
+	private void react_r2_B_r_BA() {
+		if (check_r2_B_tr0_tr0()) {
+			effect_r2_B_tr0();
+		} else {
+			if (check_r2_B_r_BA_tr0_tr0()) {
+				effect_r2_B_r_BA_tr0();
+			}
+		}
+	}
+
+	/* The reactions of state BB. */
+	private void react_r2_B_r_BB() {
+		if (check_r2_B_tr0_tr0()) {
+			effect_r2_B_tr0();
+		} else {
+			if (check_r2_B_r_BB_tr0_tr0()) {
+				effect_r2_B_r_BB_tr0();
+			}
+		}
+	}
+
+	/* The reactions of state D. */
+	private void react_r2_D() {
+		if (check_r2_D_tr0_tr0()) {
+			effect_r2_D_tr0();
+		} else {
+			if (check_r2_D_tr1_tr1()) {
+				effect_r2_D_tr1();
+			}
+		}
+	}
+
+	/* The reactions of state A. */
+	private void react_r1_A() {
+	}
+
+	/* Default react sequence for initial entry default */
+	private void react_r2_default() {
+		sCInterface.setEnteredR2(true);
+
+		enterSequence_r2_B_default();
+	}
+
+	/* Default react sequence for shallow history entry default */
+	private void react_r2_B_r_default() {
+		/* Enter the region with shallow history */
+		if (historyVector[0] != State.$NullState$) {
+			shallowEnterSequence_r2_B_r();
+		} else {
+			sCInterface.setEnteredBdefault(true);
+
+			enterSequence_r2_B_r_BA_default();
+		}
+	}
+
+	/* Default react sequence for initial entry other */
+	private void react_r2_B_r_other() {
+		sCInterface.setEnteredBother(true);
+
+		enterSequence_r2_B_r_BB_default();
+	}
+
+	/* Default react sequence for initial entry  */
+	private void react_r1__entry_Default() {
+		sCInterface.setEnteredR1(true);
+
+		enterSequence_r1_A_default();
+	}
+
+	public void runCycle() {
+		if (!initialized)
+			throw new IllegalStateException(
+					"The statemachine needs to be initialized first by calling the init() function.");
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case r2_B_r_BA :
+					react_r2_B_r_BA();
+					break;
+				case r2_B_r_BB :
+					react_r2_B_r_BB();
+					break;
+				case r2_D :
+					react_r2_D();
+					break;
+				case r1_A :
+					react_r1_A();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 21 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/entryreactionaction/IEntryReactionActionStatemachine.java

@@ -0,0 +1,21 @@
+package org.yakindu.scr.entryreactionaction;
+import org.yakindu.scr.IStatemachine;
+
+public interface IEntryReactionActionStatemachine extends IStatemachine {
+	public interface SCInterface {
+		public void raiseB();
+		public void raiseD();
+		public boolean getEnteredR1();
+		public void setEnteredR1(boolean value);
+		public boolean getEnteredR2();
+		public void setEnteredR2(boolean value);
+		public boolean getEnteredBdefault();
+		public void setEnteredBdefault(boolean value);
+		public boolean getEnteredBother();
+		public void setEnteredBother(boolean value);
+
+	}
+
+	public SCInterface getSCInterface();
+
+}

+ 0 - 49
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/ActionOutgoingTransitionsInitialStateTest.java

@@ -1,49 +0,0 @@
-/**
-* Copyright (c) 2016 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.actionoutgoingtransitionsinitialstate.ActionOutgoingTransitionsInitialStateStatemachine;
-import org.yakindu.scr.actionoutgoingtransitionsinitialstate.ActionOutgoingTransitionsInitialStateStatemachine.State;
-/**
- *  Unit TestCase for ActionOutgoingTransitionsInitialState
- */
-@SuppressWarnings("all")
-public class ActionOutgoingTransitionsInitialStateTest {
-
-	private ActionOutgoingTransitionsInitialStateStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new ActionOutgoingTransitionsInitialStateStatemachine();
-		statemachine.init();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testActionOutgoingTransitionsInitialStateTest() {
-		statemachine.enter();
-		assertTrue(statemachine.isStateActive(State.region_1__1));
-		assertTrue(statemachine.isStateActive(State.region_2__1));
-		assertTrue(statemachine.isStateActive(State.region_2__1_r1__2));
-		assertTrue(statemachine.getInternalB() == 5l);
-		assertTrue(statemachine.getC() == 5l);
-		assertTrue(statemachine.getD() == 5l);
-	}
-}

+ 11 - 12
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java

@@ -14,18 +14,17 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
-@SuiteClasses({ActionOutgoingTransitionsInitialStateTest.class, AlwaysOncycleTest.class,
-		AssignmentAsExpressionTest.class, BitExpressionsTest.class, BooleanExpressionsTest.class,
-		CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class, ConditionalExpressionTest.class,
-		ConstantsTestsTest.class, DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class,
-		DynamicChoiceTest.class, EmptyTransitionTest.class, EnterStateTest.class, EntryChoiceTest.class,
-		EntryExitSelfTransitionTest.class, ExitOnSelfTransitionTest.class, ExitStateTest.class, FeatureCallsTest.class,
-		FinalStateTest.class, GuardTest.class, GuardedEntryTest.class, GuardedExitTest.class,
-		HistoryWithExitPointTest.class, HistoryWithoutInitialStepTest.class, InEventLifeCycleTest.class,
-		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class, LocalReactionsTest.class,
-		LogicalAndTestsTest.class, LogicalOrTestsTest.class, NamedInterfaceAccessTest.class,
-		OutEventLifeCycleTest.class, ParenthesisTest.class, PriorityValuesTest.class, RaiseEventTest.class,
-		ReadOnlyVariableTest.class, SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
+@SuiteClasses({AlwaysOncycleTest.class, AssignmentAsExpressionTest.class, BitExpressionsTest.class,
+		BooleanExpressionsTest.class, CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class,
+		ConditionalExpressionTest.class, ConstantsTestsTest.class, DeclarationsTest.class, DeepEntryTest.class,
+		DeepHistoryTest.class, DynamicChoiceTest.class, EmptyTransitionTest.class, EnterStateTest.class,
+		EntryChoiceTest.class, EntryExitSelfTransitionTest.class, EntryReactionActionTest.class,
+		ExitOnSelfTransitionTest.class, ExitStateTest.class, FeatureCallsTest.class, FinalStateTest.class,
+		GuardTest.class, GuardedEntryTest.class, GuardedExitTest.class, HistoryWithExitPointTest.class,
+		HistoryWithoutInitialStepTest.class, InEventLifeCycleTest.class, IntegerExpressionsTest.class,
+		InternalEventLifeCycleTest.class, LocalReactionsTest.class, LogicalAndTestsTest.class, LogicalOrTestsTest.class,
+		NamedInterfaceAccessTest.class, OutEventLifeCycleTest.class, ParenthesisTest.class, PriorityValuesTest.class,
+		RaiseEventTest.class, ReadOnlyVariableTest.class, SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
 		ShallowHistoryWithDeepEntryTest.class, SimpleEventTest.class, SimpleHierachyTest.class,
 		StatechartActiveTest.class, StatechartLocalReactionsTest.class, StateIsActiveTest.class, StaticChoiceTest.class,
 		STextKeywordsInStatesAndRegionsTest.class, StringExpressionsTest.class, SyncForkTest.class, SyncJoinTest.class,

+ 83 - 0
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/EntryReactionActionTest.java

@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2016 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.entryreactionaction.EntryReactionActionStatemachine;
+import org.yakindu.scr.entryreactionaction.EntryReactionActionStatemachine.State;
+/**
+ *  Unit TestCase for EntryReactionAction
+ */
+@SuppressWarnings("all")
+public class EntryReactionActionTest {
+
+	private EntryReactionActionStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new EntryReactionActionStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testentryTransitionActionOnStatechartEnter() {
+		statemachine.enter();
+		assertTrue(statemachine.getEnteredR1());
+		assertTrue(statemachine.getEnteredR2());
+		assertTrue(statemachine.getEnteredBdefault());
+		assertTrue(!statemachine.getEnteredBother());
+	}
+	@Test
+	public void testentryOnRTS() {
+		statemachine.enter();
+		statemachine.raiseB();
+		statemachine.runCycle();
+		statemachine.raiseD();
+		statemachine.runCycle();
+		statemachine.setEnteredR1(false);
+		statemachine.setEnteredR2(false);
+		statemachine.setEnteredBdefault(false);
+		statemachine.setEnteredBother(false);
+		statemachine.raiseB();
+		statemachine.runCycle();
+		assertTrue(!statemachine.getEnteredR1());
+		assertTrue(!statemachine.getEnteredR2());
+		assertTrue(!statemachine.getEnteredBdefault());
+		assertTrue(statemachine.getEnteredBother());
+	}
+	@Test
+	public void testnoEntryTransitionActionOnHistory() {
+		statemachine.enter();
+		statemachine.raiseB();
+		statemachine.runCycle();
+		statemachine.raiseD();
+		statemachine.runCycle();
+		statemachine.setEnteredR1(false);
+		statemachine.setEnteredR2(false);
+		statemachine.setEnteredBdefault(false);
+		statemachine.setEnteredBother(false);
+		statemachine.raiseD();
+		statemachine.runCycle();
+		assertTrue(!statemachine.getEnteredR1());
+		assertTrue(!statemachine.getEnteredR2());
+		assertTrue(!statemachine.getEnteredBdefault());
+		assertTrue(!statemachine.getEnteredBother());
+	}
+}