Fixes broken integration tests by having them use IntegrationTestModule instead of the default injector. Change-Id: I7014a168e5d07cfc81433554242c910fad94984f
diff --git a/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Images_imageFor_Test.java b/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Images_imageFor_Test.java index e2893cb..7e861ce 100644 --- a/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Images_imageFor_Test.java +++ b/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Images_imageFor_Test.java
@@ -10,8 +10,9 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; - +import static com.google.eclipse.protobuf.junit.core.IntegrationTestModule.integrationTestModule; import static com.google.eclipse.protobuf.junit.core.XtextRule.createWith; +import static com.google.eclipse.protobuf.junit.core.XtextRule.overrideRuntimeModuleWith; import static com.google.eclipse.protobuf.protobuf.ProtobufPackage.Literals.OPTION; import static com.google.eclipse.protobuf.ui.labeling.ProjectFileExists.existsInProject; @@ -46,7 +47,7 @@ * @author alruiz@google.com (Alex Ruiz) */ public class Images_imageFor_Test { - @Rule public XtextRule xtext = createWith(ProtobufEditorPlugIn.injector()); + @Rule public XtextRule xtext = overrideRuntimeModuleWith(integrationTestModule()); @Inject private Images images;
diff --git a/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Labels_labelFor_Test.java b/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Labels_labelFor_Test.java index 4fb9467..f0f62b7 100644 --- a/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Labels_labelFor_Test.java +++ b/com.google.eclipse.protobuf.ui.integration.test/src/com/google/eclipse/protobuf/ui/labeling/Labels_labelFor_Test.java
@@ -11,8 +11,9 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; - +import static com.google.eclipse.protobuf.junit.core.IntegrationTestModule.integrationTestModule; import static com.google.eclipse.protobuf.junit.core.XtextRule.createWith; +import static com.google.eclipse.protobuf.junit.core.XtextRule.overrideRuntimeModuleWith; import org.eclipse.jface.viewers.StyledString; import org.junit.Rule; @@ -38,7 +39,7 @@ * @author alruiz@google.com (Alex Ruiz) */ public class Labels_labelFor_Test { - @Rule public XtextRule xtext = createWith(ProtobufEditorPlugIn.injector()); + @Rule public XtextRule xtext = overrideRuntimeModuleWith(integrationTestModule()); @Inject private Labels labels;