Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend')
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend
index 1ffd72ab8..2c5432e29 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/FsmGenTestBase.xtend
@@ -19,12 +19,13 @@ import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
import org.eclipse.etrice.core.RoomStandaloneSetup
import org.eclipse.etrice.core.TestBase
-import org.eclipse.etrice.core.genmodel.fsm.ExtendedFsmGenBuilder
import org.eclipse.etrice.core.genmodel.fsm.IDiagnostician
import org.eclipse.etrice.core.genmodel.fsm.NullDiagnostician
import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
import org.eclipse.etrice.core.room.ActorClass
import org.eclipse.etrice.core.room.RoomModel
+import org.eclipse.etrice.core.genmodel.fsm.ExtendedFsmGenBuilderFactory
+import org.eclipse.etrice.core.genmodel.fsm.ExtendedFsmGenBuilder
class FsmGenTestBase extends TestBase {
@@ -32,13 +33,16 @@ class FsmGenTestBase extends TestBase {
protected ActorClass actor
protected IDiagnostician diagnostician = new NullDiagnostician
protected extension ExtendedFsmGenBuilder builder
+
+ new() {
+ val injector = new RoomStandaloneSetup().createInjectorAndDoEMFRegistration()
+ builder = injector.getInstance(ExtendedFsmGenBuilderFactory).create(diagnostician)
+ }
protected def getGraphContainer(String roomFile, String actorName) {
prepare(FSMGenModelTestsActivator.getInstance().getBundle())
res = getResource(roomFile)
actor = (res.contents.get(0) as RoomModel).actorClasses.findFirst[name.equals(actorName)]
- val injector = new RoomStandaloneSetup().createInjectorAndDoEMFRegistration()
- builder = new ExtendedFsmGenBuilder(injector, diagnostician)
builder.createTransformedModel(actor)
}

Back to the top