|
@@ -12,9 +12,13 @@ package org.yakindu.sct.model.stext.test.util;
|
|
|
|
|
|
import org.eclipse.xtext.junit4.IInjectorProvider;
|
|
|
import org.yakindu.sct.domain.generic.modules.GenericSimulationModule;
|
|
|
+import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
|
|
|
|
+import com.google.inject.AbstractModule;
|
|
|
+import com.google.inject.Binder;
|
|
|
import com.google.inject.Guice;
|
|
|
import com.google.inject.Injector;
|
|
|
+import com.google.inject.name.Names;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -24,7 +28,16 @@ import com.google.inject.Injector;
|
|
|
public class STextInjectorProvider implements IInjectorProvider {
|
|
|
|
|
|
public Injector getInjector() {
|
|
|
- return Guice.createInjector(new STextRuntimeTestModule(), new GenericSimulationModule());
|
|
|
+ return Guice.createInjector(new STextRuntimeTestModule(), new GenericSimulationModule(), new AbstractModule() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void configure() {
|
|
|
+ bind(String.class).annotatedWith(Names.named("domainId"))
|
|
|
+ .toInstance(SGraphPackage.Literals.STATECHART__DOMAIN_ID.getDefaultValueLiteral());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
}
|