Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Cartaud2016-07-01 03:56:12 -0400
committerLaurent Delaigue2016-07-01 10:04:55 -0400
commita69e93cc3f989615c512a12e5a4e62ec5ff95bc8 (patch)
tree3fdc700ae064e639f14ea18fc082a8b9d5aa0cd5
parent38670759ff36933a0bce2de15f4d878b62d8c854 (diff)
downloadorg.eclipse.emf.compare-a69e93cc3f989615c512a12e5a4e62ec5ff95bc8.tar.gz
org.eclipse.emf.compare-a69e93cc3f989615c512a12e5a4e62ec5ff95bc8.tar.xz
org.eclipse.emf.compare-a69e93cc3f989615c512a12e5a4e62ec5ff95bc8.zip
Fix test broken by new default preference on pre-merge
Change-Id: Iff50e6719531b24034419e91a8088f03fddf90b4 Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/GitMergeTest.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/GitMergeTest.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/GitMergeTest.java
index e9d6429f1..6deea781f 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/GitMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/GitMergeTest.java
@@ -15,9 +15,14 @@ import static org.junit.Assert.assertNotNull;
import java.util.Set;
+import org.eclipse.emf.compare.ide.ui.internal.EMFCompareIDEUIPlugin;
+import org.eclipse.emf.compare.ide.ui.internal.preferences.EMFCompareUIPreferences;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jgit.api.Status;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
/**
@@ -25,9 +30,29 @@ import org.junit.Test;
*
* @author Alexandra Buzila
*/
-@SuppressWarnings("nls")
+@SuppressWarnings({"nls", "restriction", })
public class GitMergeTest extends AbstractGitLogicalModelTest {
+ private final IPreferenceStore store = EMFCompareIDEUIPlugin.getDefault().getPreferenceStore();
+
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+
+ // The test need to have the pre-merge preference set to true
+ store.setValue(EMFCompareUIPreferences.PRE_MERGE_MODELS_WHEN_CONFLICT, true);
+ }
+
+ @Override
+ @After
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ // Reset pre-merge default value to the classic one
+ store.setToDefault(EMFCompareUIPreferences.PRE_MERGE_MODELS_WHEN_CONFLICT);
+ }
+
/**
* Sets up a repository with three commits on two branches:
* <ul>

Back to the top