Made integration tests headless. Code cleanup.
diff --git a/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
index 1f4ef9b..77a8e97 100644
--- a/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
Bundle-SymbolicName: com.google.eclipse.protobuf.integration.test
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Google Inc.
-Fragment-Host: com.google.eclipse.protobuf.ui;bundle-version="1.0.9"
+Fragment-Host: com.google.eclipse.protobuf;bundle-version="1.0.9"
Require-Bundle: org.junit;bundle-version="4.8.1",
org.eclipse.xtext.junit;bundle-version="2.0.0",
org.eclipse.xtext.junit4;bundle-version="2.0.0",
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Descriptor_availableOptionsFor_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Descriptor_availableOptionsFor_Test.java
index 99909ce..62331be 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Descriptor_availableOptionsFor_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Descriptor_availableOptionsFor_Test.java
@@ -9,7 +9,6 @@
package com.google.eclipse.protobuf.scoping;
import static com.google.eclipse.protobuf.junit.matchers.PropertyHasType.hasType;
-import static com.google.eclipse.protobuf.ui.Internals.injector;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
@@ -19,6 +18,7 @@
import org.eclipse.emf.ecore.EObject;
import org.junit.*;
+import com.google.eclipse.protobuf.junit.core.XtextRule;
import com.google.eclipse.protobuf.protobuf.*;
/**
@@ -28,10 +28,12 @@
*/
public class Descriptor_availableOptionsFor_Test {
- private static ProtoDescriptor descriptor;
+ @Rule public XtextRule xtext = XtextRule.integrationTestSetup();
- @BeforeClass public static void setUpOnce() {
- ProtoDescriptorProvider descriptorProvider = injector().getInstance(ProtoDescriptorProvider.class);
+ private ProtoDescriptor descriptor;
+
+ @Before public void setUp() {
+ ProtoDescriptorProvider descriptorProvider = xtext.getInstanceOf(ProtoDescriptorProvider.class);
descriptor = descriptorProvider.primaryDescriptor();
}
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue91AddSupportForUTF16Strings.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue91AddSupportForUTF16Strings.java
index e505ffd..53a8575 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue91AddSupportForUTF16Strings.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue91AddSupportForUTF16Strings.java
@@ -20,7 +20,7 @@
*/
public class Issue91AddSupportForUTF16Strings {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
@Test public void should_recognize_UTF16_strings() {
MultiLineTextBuilder proto = new MultiLineTextBuilder();
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_Test.java
index 6804161..b9692fd 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_Test.java
@@ -32,7 +32,7 @@
@RunWith(Parameterized.class)
public class DOUBLEValueConverter_toValue_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private final String input;
private final Double expected;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_withInvalidInput_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_withInvalidInput_Test.java
index 6a1df58..095a05b 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_withInvalidInput_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/DOUBLEValueConverter_toValue_withInvalidInput_Test.java
@@ -28,7 +28,7 @@
*/
public class DOUBLEValueConverter_toValue_withInvalidInput_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
@Rule public ExpectedException thrown = none();
private DOUBLEValueConverter converter;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_Test.java
index cd1f5fe..06f20d7 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_Test.java
@@ -31,7 +31,7 @@
@RunWith(Parameterized.class)
public class HEXValueConverter_toValue_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private final String input;
private final Long expected;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_withInvalidInput_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_withInvalidInput_Test.java
index 7de5b56..c31fc05 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_withInvalidInput_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/HEXValueConverter_toValue_withInvalidInput_Test.java
@@ -28,7 +28,7 @@
*/
public class HEXValueConverter_toValue_withInvalidInput_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
@Rule public ExpectedException thrown = none();
private HEXValueConverter converter;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/LONGValueConverter_toValue_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/LONGValueConverter_toValue_Test.java
index 7e6220c..8bb587d 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/LONGValueConverter_toValue_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/LONGValueConverter_toValue_Test.java
@@ -31,7 +31,7 @@
*/
public class LONGValueConverter_toValue_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
@Rule public ExpectedException thrown = none();
private LONGValueConverter converter;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/STRINGValueConverter_toValue_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/STRINGValueConverter_toValue_Test.java
index b8b470d..6c33022 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/STRINGValueConverter_toValue_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/conversion/STRINGValueConverter_toValue_Test.java
@@ -31,7 +31,7 @@
@RunWith(Parameterized.class)
public class STRINGValueConverter_toValue_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private final String input;
private final String expected;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
index ac83685..61d67c0 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
@@ -25,6 +25,7 @@
import org.junit.rules.MethodRule;
import org.junit.runners.model.*;
+import com.google.eclipse.protobuf.ProtobufStandaloneSetup;
import com.google.eclipse.protobuf.junit.util.MultiLineTextBuilder;
import com.google.eclipse.protobuf.protobuf.Protobuf;
import com.google.inject.Injector;
@@ -39,11 +40,15 @@
private final ISetup setup;
private Injector injector;
- public XtextRule() {
- this(new TestingStandaloneSetup());
+ public static XtextRule unitTestSetup() {
+ return new XtextRule(new TestingStandaloneSetup());
}
- public XtextRule(ISetup setup) {
+ public static XtextRule integrationTestSetup() {
+ return new XtextRule(new ProtobufStandaloneSetup());
+ }
+
+ private XtextRule(ISetup setup) {
this.setup = setup;
}
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/naming/ProtobufQualifiedNameProvider_getFullyQualifiedName_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/naming/ProtobufQualifiedNameProvider_getFullyQualifiedName_Test.java
index 99a401e..4c55bb2 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/naming/ProtobufQualifiedNameProvider_getFullyQualifiedName_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/naming/ProtobufQualifiedNameProvider_getFullyQualifiedName_Test.java
@@ -27,7 +27,7 @@
*/
public class ProtobufQualifiedNameProvider_getFullyQualifiedName_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufQualifiedNameProvider provider;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/LocalNamesProvider_namesOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/LocalNamesProvider_namesOf_Test.java
index a49bdad..591d593 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/LocalNamesProvider_namesOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/LocalNamesProvider_namesOf_Test.java
@@ -32,7 +32,7 @@
*/
public class LocalNamesProvider_namesOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private LocalNamesProvider namesProvider;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/QualifiedNames_addLeadingDot_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/QualifiedNames_addLeadingDot_Test.java
index eb44a88..01f82b9 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/QualifiedNames_addLeadingDot_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/scoping/QualifiedNames_addLeadingDot_Test.java
@@ -23,7 +23,7 @@
*/
public class QualifiedNames_addLeadingDot_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private QualifiedNames qualifiedNames;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ModelNodes_firstNodeForFeature_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ModelNodes_firstNodeForFeature_Test.java
index 3c8bd79..6061ae9 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ModelNodes_firstNodeForFeature_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ModelNodes_firstNodeForFeature_Test.java
@@ -28,7 +28,7 @@
*/
public class ModelNodes_firstNodeForFeature_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ModelNodes nodes;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isBool_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isBool_Test.java
index 4015f3b..8c72741 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isBool_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isBool_Test.java
@@ -26,7 +26,7 @@
*/
public class Properties_isBool_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Properties properties;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isPrimitive_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isPrimitive_Test.java
index a5a657b..044f5a4 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isPrimitive_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isPrimitive_Test.java
@@ -26,7 +26,7 @@
*/
public class Properties_isPrimitive_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Properties properties;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isString_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isString_Test.java
index 2965711..e68e5df 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isString_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_isString_Test.java
@@ -26,7 +26,7 @@
*/
public class Properties_isString_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Properties properties;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_typeNameOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_typeNameOf_Test.java
index 0a1aa33..7f4166f 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_typeNameOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Properties_typeNameOf_Test.java
@@ -26,7 +26,7 @@
*/
public class Properties_typeNameOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Properties properties;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_enumTypeOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_enumTypeOf_Test.java
index d6207c4..2cdf80d 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_enumTypeOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_enumTypeOf_Test.java
@@ -27,7 +27,7 @@
*/
public class ProtobufElementFinder_enumTypeOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufElementFinder finder;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_importsIn_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_importsIn_Test.java
index 1fbf47c..2495f6a 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_importsIn_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_importsIn_Test.java
@@ -26,7 +26,7 @@
*/
public class ProtobufElementFinder_importsIn_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufElementFinder finder;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_packageOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_packageOf_Test.java
index 3ac4bda..972ed95 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_packageOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_packageOf_Test.java
@@ -28,7 +28,7 @@
*/
public class ProtobufElementFinder_packageOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufElementFinder finder;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_rootOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_rootOf_Test.java
index 475b9e6..40bffbe 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_rootOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_rootOf_Test.java
@@ -27,7 +27,7 @@
*/
public class ProtobufElementFinder_rootOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufElementFinder finder;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_scalarTypeOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_scalarTypeOf_Test.java
index 8b6d071..231176c 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_scalarTypeOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/ProtobufElementFinder_scalarTypeOf_Test.java
@@ -26,7 +26,7 @@
*/
public class ProtobufElementFinder_scalarTypeOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private ProtobufElementFinder finder;
diff --git a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/commands/CommentNodesFinder_matchingCommentNode_Test.java b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/commands/CommentNodesFinder_matchingCommentNode_Test.java
index 2ac8385..397a32a 100644
--- a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/commands/CommentNodesFinder_matchingCommentNode_Test.java
+++ b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/commands/CommentNodesFinder_matchingCommentNode_Test.java
@@ -31,7 +31,7 @@
*/
public class CommentNodesFinder_matchingCommentNode_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private CommentNodesFinder finder;
diff --git a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/documentation/SingleLineCommentDocumentationProvider_getDocumentation_Test.java b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/documentation/SingleLineCommentDocumentationProvider_getDocumentation_Test.java
index fa4c7f5..16f7903 100644
--- a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/documentation/SingleLineCommentDocumentationProvider_getDocumentation_Test.java
+++ b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/documentation/SingleLineCommentDocumentationProvider_getDocumentation_Test.java
@@ -26,7 +26,7 @@
*/
public class SingleLineCommentDocumentationProvider_getDocumentation_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private SingleLineCommentDocumentationProvider provider;
diff --git a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Fields_calculateTagNumberOf_Test.java b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Fields_calculateTagNumberOf_Test.java
index 6c2238a..5df884d 100644
--- a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Fields_calculateTagNumberOf_Test.java
+++ b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Fields_calculateTagNumberOf_Test.java
@@ -25,7 +25,7 @@
*/
public class Fields_calculateTagNumberOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Fields fields;
diff --git a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Literals_calculateIndexOf_Test.java b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Literals_calculateIndexOf_Test.java
index 40cf01a..3d0dcae 100644
--- a/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Literals_calculateIndexOf_Test.java
+++ b/com.google.eclipse.protobuf.ui.test/src/com/google/eclipse/protobuf/ui/util/Literals_calculateIndexOf_Test.java
@@ -26,7 +26,7 @@
*/
public class Literals_calculateIndexOf_Test {
- @Rule public XtextRule xtext = new XtextRule();
+ @Rule public XtextRule xtext = XtextRule.unitTestSetup();
private Literals literals;